remark-docusaurus

Remark plugin for docusaurus features


Keywords
code-block, directive, doc, document, documentation, docusaurus, markdown, remark, remark-plugin, remarkjs, site-generator, tabs
License
MIT
Install
npm install remark-docusaurus@0.3.9

Documentation

remark-docusaurus

Remark plugin for docusaurus features.

npm github node

Installation

npm install remark-docusaurus --save-dev

Usage

// docusaurus.config.mjs
import {
  autoTabs,
  docCardList,
  draftSAdmonition,
  svgToObject
} from 'remark-docusaurus';

export default {
  presets: [
    [
      'classic',
      {
        docs: {
          beforeDefaultRemarkPlugins: [
            autoTabs,
            docCardList,
            draftSAdmonition,
            svgToObject
          ]
        }
      }
    ]
  ]
};

DocCardList

Turn:

# heading

:docusaurus-doc-card-list

foo bar

Into:

import DocCardList from '@theme/DocCardList';

# heading

<DocCardList />

foo bar

AutoTabs

Options.labels

  • type: object
  • default: {}
  • description: Will merge with default presets

Turn:

```js tab

```

Into:

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
  <TabItem label="JavaScript">
  ```js tab
  ```
  </TabItem>
</Tabs>

Tips

This plugin only compatible with docusaurus@3/remark@^13+/mdx@3+.

Related