📦 theme-mermaid
This theme provides a @theme/Mermaid
component that is powered by mermaid. You can read more on diagrams documentation.
- npm
- Yarn
- pnpm
npm install --save @docusaurus/theme-mermaid
yarn add @docusaurus/theme-mermaid
pnpm add @docusaurus/theme-mermaid
Configuration
docusaurus.config.js
export default {
themes: ['@docusaurus/theme-mermaid'],
// 为了让 Mermaid 代码块在 Markdown 中正常运行,
// 你还需要通过这个设置来启用 Remark 插件
markdown: {
mermaid: true,
},
};