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

@albertigroup/docusaurus-plugin-swagger

v1.1.1

Published

Bring Swagger UI inside Docusaurus

Readme

@albertigroup/docusaurus-plugin-swagger

A Docusaurus plugin that renders Swagger UI inline in your documentation site.

Features

  • Renders Swagger UI via a dedicated route in your Docusaurus site
  • Built on swagger-ui-react v5
  • TypeScript-first, fully typed plugin and component API
  • Compatible with Docusaurus v3

Requirements

| Peer dependency | Version | |--------------------|-----------| | @docusaurus/core | ^3.10.1 | | react | ^18.0.0 | | react-dom | ^18.0.0 |

Installation

# pnpm
pnpm add @albertigroup/docusaurus-plugin-swagger

# npm
npm install @albertigroup/docusaurus-plugin-swagger

# yarn
yarn add @albertigroup/docusaurus-plugin-swagger

Usage

1. Register the plugin

In your docusaurus.config.ts:

import type { Config } from '@docusaurus/types';

const config: Config = {
  // ...
  plugins: [
    [
      '@albertigroup/docusaurus-plugin-swagger',
      {
        id: 'my-api',
        defaultSpecPath: './swagger/my-api.yaml',
        routePath: '/api',
        specFileName: 'my-api.yaml', // used for i18n
      },
    ],
  ],
};

export default config;

2. Multiple instances

You can register the plugin multiple times with different id values to expose multiple APIs:

plugins: [
  [
    '@albertigroup/docusaurus-plugin-swagger',
    {
      id: 'public-api',
      defaultSpecPath: './swagger/public-api.yaml',
      routePath: '/api/public',
      specFileName: 'public-api.yaml',
    },
  ],
  [
    '@albertigroup/docusaurus-plugin-swagger',
    {
      id: 'admin-api',
      defaultSpecPath: './swagger/admin-api.yaml',
      routePath: '/api/admin',
      specFileName: 'admin-api.yaml',
    },
  ],
],

3. i18n

Place your translated YAML files at:

i18n/{locale}/docusaurus-plugin-swagger/{specFileName}

Examples:

i18n/en/docusaurus-plugin-swagger/public-api.yaml
i18n/es/docusaurus-plugin-swagger/admin-api.yaml

Plugin options

| Option | Type | Required | Default | Description | |-------------------|----------|----------|-------------|---------------------------------------------------------| | id | string | No | 'default' | Unique plugin instance ID (required for multi-instance) | | defaultSpecPath | string | Yes | — | Path to the default locale OpenAPI/Swagger YAML file | | routePath | string | Yes | — | Base path where Swagger UI will be rendered | | specFileName | string | No | — | File name used to resolve locale-specific spec files |

License

MIT © Alberti Group