Redocusaurus
Redoc for Docusaurus v2.
Usage
-
Install redocusaurus:
npm i --save redocusaurus
-
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
-
For plugin options see docusaurus-plugin-redoc
-
For theme options see docusaurus-theme-redoc