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 🙏

© 2024 – Pkg Stats / Ryan Hefner

docusaurus-theme-redoc

v2.2.0

Published

Redoc Component for DocusaurusV2

Downloads

93,108

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 with dark mode support.

⚠️⚠️⚠️ NOTE: Not recommended for direct use. Use through main package instead: redocusaurus

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

{
   /**
   * Highlight color for docs
   */
   primaryColor: '#1890ff',
   /**
    * Highlight color for docs in dark mode, if different.
    * Will default to `primaryColor` if not set.
    */
   primaryColorDark: '#25c2a0',
   /**
   * Options to pass to redoc
   * @see https://github.com/redocly/redoc#redoc-options-object
   */
   options: { disableSearch: true },
   /**
   * Options to pass to override RedocThemeObject
   * @see https://github.com/Redocly/redoc#redoc-theme-object
   */
   theme: { typography: { fontSize: '16px' }},
}

primaryColor (string, hex/rgba value)

Convenient way to provide the highlighted color used by Redoc.
This value will be used as colors.primary.main in the themes option. Must be an actual color value and not a css variable.

primaryColorDark (string, hex/rgba value)

Optional way to change the highlighted color used by Redoc in dark mode. Defaults to primaryColor if not set. This value will be used as colors.primary.main in the themes option. Must be an actual color value and not a css variable.

options (optional, object)

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

Available properties here.
You cannot set theme property using this property, use theme option below instead.

theme (optional, object)

Override the redoc theme object passed to Redoc. See the default here.

Note: You should not provide any color using this property, as it will be the same value for dark and light themes.

Docs

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