Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redocusaurus

Package Overview
Dependencies
Maintainers
0
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redocusaurus

Redoc for DocusaurusV2

  • 2.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24K
increased by3.61%
Maintainers
0
Weekly downloads
 
Created
Source

Redocusaurus

npm

Redoc for Docusaurus.

Usage

  1. Setup docusaurus project

  2. Install redocusaurus:

yarn add redocusaurus
# OR
pnpm add redocusaurus
# OR
npm i --save redocusaurus
  1. Add it as a preset to your docusaurus config along with @docusaurus/preset-classic and pass options:

    // docusaurus.config.ts
    import type { Config } from '@docusaurus/types';
    import type * as Preset from '@docusaurus/preset-classic';
    import type * as Redocusaurus from 'redocusaurus';
    
    const config: Config = {
      // ...
      presets: [
        // .. Your other presets' config
        [
         '@docusaurus/preset-classic',
          {
            googleAnalytics: {
              trackingID: 'XXXXXX',
            },
          } satisfies Preset.Options,
        ]
        // Redocusaurus config
        [
          'redocusaurus',
          {
            // Plugin Options for loading OpenAPI files
            specs: [
              // Pass it a path to a local OpenAPI YAML file
              {
                // Redocusaurus will automatically bundle your spec into a single file during the build
                spec: 'openapi/index.yaml',
                route: '/api/',
              },
              // You can also pass it a OpenAPI spec URL
              {
                spec: 'https://redocly.github.io/redoc/openapi.yaml',
                route: '/openapi/',
              },
            ],
            // Theme Options for modifying how redoc renders them
            theme: {
              // Change with your site colors
              primaryColor: '#1890ff',
            },
          },
        ] satisfies Redocusaurus.PresetEntry,
      ],
      // ... Rest of your config
    };
    
    export default config;
    

The API Doc will be available at the route specified (/api/ in the example above). To customize it see full plugin options.

Options

specs

Pass it an array of plugin options, see docusaurus-plugin-redoc for individual option details.

theme

Pass options to customize the theme, see docusaurus-theme-redoc for individual option details.

Docs

See: https://redocusaurus.vercel.app/docs

Keywords

FAQs

Package last updated on 10 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc