vitepress-plugin-mermaid2
v0.0.3
Published
Add mermaid support for Vitepress
Readme
vitepress-plugin-mermaid2
Add mermaid support for Vitepress. It detects any dark theme that are set in body as long as it has dark in the name
Install
npm
npm i vitepress-plugin-mermaid2 mermaid -Dpnpm
pnpm install vitepress-plugin-mermaid2 mermaid -D Setup it up
Add wrapper
// .vitepress/config.js
import { withMermaid } from "vitepress-plugin-mermaid2";
export default withMermaid({
// your existing vitepress config...
mermaid:{
//mermaidConfig !theme here works for light mode since dark theme is forced in dark mode
},
...
});Use in any Markdown file
<!---any-file.md-->
```mermaid
flowchart TD
Start --> Stop
```