npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

docusaurus-plugin-statuspage

v0.1.0

Published

Displays a discreet banner for degraded Statuspage.io incidents on page load.

Readme

Docusaurus Plugin: Statuspage banner

CI npm version

Displays a discreet banner on initial page load if your public statuspage.io reports degraded service or ongoing incidents. Links users to your Statuspage for more details.

Installation

npm install docusaurus-plugin-statuspage

Configuration

Add to docusaurus.config.js or docusaurus.config.ts:

// docusaurus.config.js
module.exports = {
  // ... existing config ...
  plugins: [
    [
      'docusaurus-plugin-statuspage',
      {
        statuspageUrl: 'https://acme.statuspage.io',
        // optional
        enabled: true,
        position: 'bottom-left', // 'bottom-right' | 'top-left' | 'top-right'
        linkLabel: 'View status',
      },
    ],
  ],
}

Options

| Option | Type | Default | Description | | --------------- | --------- | --------------- | ------------------------------------------------------------------------------- | | statuspageUrl | string | required | Your Statuspage.io URL (e.g., https://acme.statuspage.io) | | enabled | boolean | true | Enable or disable the plugin | | position | string | 'bottom-left' | Banner position: 'bottom-left', 'bottom-right', 'top-left', 'top-right' | | linkLabel | string | 'View status' | Text for the link to your status page |

How it works

On build, the plugin injects a small <meta name="docusaurus-statuspage" ...> tag with your configured URL and options. On the client, a lightweight script fetches GET {statuspageUrl}/api/v2/summary.json and, if the status.indicator is not none or there are ongoing incidents, renders a small, dismissible banner that links to Statuspage.

Features

  • Displays a discreet, dismissible banner
  • Automatically fetches status from Statuspage.io API
  • Persists dismissed banners per incident using localStorage
  • Configurable position
  • Respects Docusaurus theme variables for consistent styling
  • Accessible with ARIA labels and semantic HTML

Development

Quick start

# Install dependencies
npm install --legacy-peer-deps

# Build once
npm run build

# Watch and rebuild on change
npm run dev

Run the example site

npm run example:start

Testing

# Unit tests
npm test

# Unit tests in watch mode
npm run test:watch

# E2E tests (requires building example site first)
npm run example:build
npm run test:e2e

Code formatting

npm run format        # Format all files
npm run format:check  # Check formatting

Local development with a Docusaurus site

From your Docusaurus site:

# Using a local path during development
npm install ../path/to/docusaurus-plugin-statuspage

# Or via a temporary tarball
npm pack ../path/to/docusaurus-plugin-statuspage
npm install ./docusaurus-plugin-statuspage-*.tgz

Access global data

Access global data set by the plugin from any theme component:

import useDocusaurusContext from '@docusaurus/useDocusaurusContext'

export default function StatusInfo() {
  const { globalData } = useDocusaurusContext()
  const data = globalData['docusaurus-plugin-statuspage']?.default
  return <div>{data?.statuspageUrl}</div>
}

API

  • Default export: the plugin function (context, options) => Plugin
  • Types: StatuspagePluginOptions
  • Client module: client/index with onClientEntry implementation

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT