remark-docusaurus
v0.4.5
Published
Remark plugin for docusaurus features
Downloads
122
Maintainers
Readme
remark-docusaurus
Remark plugin for docusaurus features.
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+
.