Have ideas to improve npm?Join in the discussion! »

redocusaurus
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

Redocusaurus

npm

Redoc for Docusaurus v2.

Usage

  1. Install redocusaurus:

    npm i --save redocusaurus
  2. Add it as a preset to your docusaurus config and pass options:

    • Pass it a OpenAPI spec URL

      // docusaurus.config.js
      
      module.exports = {
        // ...
        presets: [
          [
            'redocusaurus',
            {
              specs: [{
                specUrl: 'https://redocly.github.io/redoc/openapi.yaml',
              }],
            }
          ],
        ],
        // ...
      }
    • Pass it a OpenAPI spec local path

      // docusaurus.config.js
      
      module.exports = {
        // ...
        presets: [
          [
            'redocusaurus',
            {
              specs: [{
                spec: 'openapi.yaml',
              }],
            }
          ],
        ],
        // ...
      }

The API Doc will be available by default at /api/ path. To customize it see full plugin options.

Options

Install

npm i redocusaurus

DownloadsWeekly Downloads

263

Version

0.2.2

License

MIT

Unpacked Size

107 kB

Total Files

22

Last publish

Collaborators

  • avatar