@crossid/docusaurus-remote-content
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

@crossid/docusaurus-remote-content

A plugin for Docusaurus to fetch content remotely.

Usage

npm: npm install --save @crossid/docusaurus-remote-content

yarn: yarn add @crossid/docusaurus-remote-content

docusaurus.config.js:

module.exports = {
  plugins: [
    [
      '@crossid/docusaurus-remote-content',
      {
        type: 'docs',
        contents: [
          {
            file: 'sample-nodejs.md',
            url: 'https://raw.githubusercontent.com/crossid/sample-nodejs/main/README.md',
            header: `:::note
This content is from the README file of https://github.com/crossid/sample-nodejs.
:::`,
            meta: {
              id: 'sample-nodejs',
              sidebar_label: 'Sample-Nodejs',
              hide_title: true,
            },
          },
      }
    ],
  ],
};

To fetch / clean remote files from CLI, add to your package.json:

{
  "scripts": {
    "fetch-remote-docs": "docusaurus fetch-remote-docs",
    "clean-remote-docs": "docusaurus clean-remote-docs"
  }
}

For complete example, see example/docusaurus.config.js

Package Sidebar

Install

npm i @crossid/docusaurus-remote-content

Weekly Downloads

0

Version

0.1.5

License

MIT

Unpacked Size

8.06 kB

Total Files

10

Last publish

Collaborators

  • asaf
  • ranisharim