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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rapidoc/docusaurus

v0.2.0

Published

RapiDoc for Docusaurus: OpenAPI reference pages inside your Docusaurus docs, with the operations in the sidebar

Readme

@rapidoc/docusaurus

Adds API reference pages to a Docusaurus site. An OpenAPI document becomes a doc page drawn by RapiDoc inside your theme, with the API's tags and operations in the docs sidebar.

npm install @rapidoc/docusaurus

1. Add the plugin and name your OpenAPI documents:

// docusaurus.config.js
export default {
  // ...
  plugins: [["@rapidoc/docusaurus", { apis: { pets: "./openapi.yaml" } }]],
};

2. Add the page, for example docs/api.mdx:

---
title: Pets API
hide_table_of_contents: true
---

import RapidocReference from '@rapidoc/docusaurus/client';

<RapidocReference api="pets" />

3. List the operations in the sidebar:

// sidebars.js
import { rapidocSidebarSync } from "@rapidoc/docusaurus";

export default {
  docs: [
    "intro",
    {
      type: "category",
      label: "Pets API",
      items: rapidocSidebarSync({ spec: "./openapi.yaml", uiPath: "/docs/api", docId: "api" }),
    },
  ],
};

docId is the id of the doc from step 2. Docusaurus shows a sidebar only on docs that are in it, so the first item is that doc, labelled "Overview".

What you get

  • Your theme's layout: its navbar, sidebar and dark-mode switch stay; RapiDoc's own header and sidebar are off, and the reference follows the theme's light and dark modes.
  • Operations in the sidebar: a category per tag with a link per operation. Each shows its HTTP method (GET, POST, DEL) in RapiDoc's colours, and deprecated operations are struck through. An operation link is a section of the page (/docs/api#list-pets), so moving between operations does not reload it, and the link of the operation that is showing is highlighted.
  • No request for the spec: the documents in apis are read at build time, and each is loaded only by the page that shows it.
  • Try it and OAuth: the console works as in RapiDoc; the OAuth return page is the route rapidoc/oauth-receiver.

API

Plugin options: apis maps a name to an OpenAPI document: a JSON or YAML file (relative to the site folder), a URL or an object.

rapidocSidebarSync({ spec, uiPath, ... }) returns sidebar items for one API. sidebars.js cannot wait for a promise, so this reads the spec in a short-lived Node process. rapidocSidebar is the same function returning a promise, for code that can wait.

| Option | Default | | | :---------- | :-------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | spec | required | The OpenAPI document: a JSON or YAML file (relative to root), a URL, or the object. It is read when the site is built | | uiPath | required | URL path of the page that shows the reference, for example /docs/api. Operation links point to sections of it | | methods | "as-colored-text" | How each operation's HTTP method is shown: "as-colored-text", "as-plain-text", "as-colored-block", or false for no method. Deprecated operations are struck through either way | | collapsed | | true starts the tag groups collapsed | | docId | | Id of the doc that holds <RapidocReference>. It becomes the first item, which is what makes Docusaurus show this sidebar on that page | | root | the working directory | Folder a relative spec file is resolved from |

<RapidocReference> props:

| Prop | | | :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | api | A name from the plugin's apis | | spec | The OpenAPI document as an object, instead of api | | options | Attributes of <rapi-doc>, in kebab-case or camelCase: options={{ allowTry: false, theme: 'jade' }}. They win over the component's own |

Notes

  • The component sets render-style="focused", show-header="false", show-side-nav="false", auto-height="true" and color-scheme="auto". Change any of them through options.
  • hide_table_of_contents: true gives the reference the width of the table-of-contents column.
  • API pages are not in the site search: their content is drawn in the browser.
  • Docusaurus 3. MIT.

Part of the RapiDoc family of open-source tools for OpenAPI and Arazzo: RapiDoc (<rapi-doc>), RapiFlow, RapiDoc Portal, RapiMock, RapiPdf, the RapiDoc CLI and integrations for Express, Fastify, Hono, FastAPI, ASP.NET Core, Go, Starlight, VitePress and Docusaurus.