Socket
Socket
Sign inDemoInstall

@metamask/docusaurus-openrpc

Package Overview
Dependencies
Maintainers
9
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask/docusaurus-openrpc

A Docusaurus plugin for generating interactive documentation from your OpenRPC document


Version published
Weekly downloads
150
increased by17.19%
Maintainers
9
Weekly downloads
 
Created
Source

Docusaurus OpenRPC Plugin

A Docusaurus plugin for OpenRPC.

Installation

npm install @metamask/docusaurus-openrpc

Usage

There are two ways to use this plugin

1. Use it as a standalone plugin

Uses its own sidebar and path.

To use the plugin as a standalone plugin, add the following to your docusaurus.config.js file:

[
  '@metamask/docusaurus-openrpc',
  {
    path: '/api-playground',
    openrpcDocument: './path/to/openrpc.json', // path or url to openrpc document.
  },
];
2. Use it as an enhanced plugin-content-docs plugin to preserve the existing sidebar

To use the plugin as an enhanced plugin-content-docs plugin, add the following to your docusaurus.config.js file:

    [
      "@metamask/docusaurus-openrpc/dist/content-docs-enhanced-open-rpc",
      ({
        // @docusaurus/plugin-content-docs options
        id: "default",
        path: "wallet",
        routeBasePath: "wallet",
        sidebarPath: require.resolve("./wallet-sidebar.js"),
        breadcrumbs: false,
        remarkPlugins: [
          require("remark-docusaurus-tabs"),
        ],
        // @docusaurus-openrpc plugin options
        openrpc: {
          openrpcDocument: "https://metamask.github.io/api-specs/latest/openrpc.json",
          path: "reference",
        }
      }),
    ],

Development

In development, you can use yarn link in this repo, then run yarn link "@metamask/docusaurus-openrpc" in your project (metamask-docs, for example). Finally, run yarn build:watch in this repo to rebuild the plugin as you make changes.

FAQs

Package last updated on 15 Jun 2023

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