docusaurus-theme-redoc

Redoc Component for DocusaurusV2

Usage no npm install needed!

<script type="module">
  import docusaurusThemeRedoc from 'https://cdn.skypack.dev/docusaurus-theme-redoc';
</script>

README

Docusaurus Theme Redoc

npm

This theme provides a Redoc and a ApiDoc theme component with a theme matching the default docusaurus classic theme and dark mode support.

Usage

  1. Install theme:

    npm i --save docusaurus-theme-redoc
    
  2. Add it as a theme to your docusaurus config:

    // docusaurus.config.js
    
    module.exports = {
      // ...
      themes: ['docusaurus-theme-redoc'],
      // ...
    };
    

Theme Components

Redoc

RedocStandalone with dark mode support, matching docusaurus classic theme.

import Redoc from '@theme/Redoc';

See here for full example.

ApiDoc

Includes a @theme/Layout wrapper over Redoc.

import ApiDoc from '@theme/ApiDoc';

See here for full example.

Options

primaryColor

Hex code to be passed as the main color to RedocStandalone

redocOptions

Override the default redoc options passed to the RedocStandalone component. See the defaults here.

Related Preset

Read More Here: https://github.com/rohit-gohri/redocusaurus

Docs

See: https://rohit-gohri.github.io/redocusaurus/docs