vitepress-plugin-mermaid
TypeScript icon, indicating that this package has built-in type declarations

2.0.16 • Public • Published

vitepress-plugin-mermaid

Add mermaid support for Vitepress. It detects any dark theme that are set in body as long as it has dark in the name

See the docs 📕
and a complex example 😎

Install

npm

npm i vitepress-plugin-mermaid mermaid -D

pnpm

pnpm install --shamefully-hoist 

Setup it up

Add wrapper

// .vitepress/config.js
import { withMermaid } from "vitepress-plugin-mermaid";

export default withMermaid({
  // your existing vitepress config...
  mermaid:{
    //mermaidConfig !theme here works for ligth mode since dark theme is forced in dark mode
  },
  ...
});

Use in any Markdown file

<!---any-file.md-->

```mermaid
flowchart TD
  Start --> Stop
```

Readme

Keywords

Package Sidebar

Install

npm i vitepress-plugin-mermaid

Weekly Downloads

6,765

Version

2.0.16

License

MIT

Unpacked Size

13.4 kB

Total Files

10

Last publish

Collaborators

  • bottero