Remark plugin for docusaurus features.
npm install remark-docusaurus --save-dev
// docusaurus.config.mjs
import {
autoTabs,
docCardList,
draftSAdmonition,
svgToObject
} from 'remark-docusaurus';
export default {
presets: [
[
'classic',
{
docs: {
beforeDefaultRemarkPlugins: [
autoTabs,
docCardList,
draftSAdmonition,
svgToObject
]
}
}
]
]
};
Turn:
# heading
:docusaurus-doc-card-list
foo bar
Into:
import DocCardList from '@theme/DocCardList';
# heading
<DocCardList />
foo bar
- 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>
This plugin only compatible with docusaurus@3/remark@^13+/mdx@3+
.