plugin-mermaid

Gungnir
2020-03-26
2 min

npm github license

Plugin @renovamen/vuepress-plugin-mermaid for adding Mermaid to VuePress to create complex diagrams in Markdown.

# Install

yarn add @renovamen/vuepress-plugin-mermaid
# or
npm install @renovamen/vuepress-plugin-mermaid

Then add it to your .vuepress/config.js:

module.exports = {
  plugins: [
    [
      '@renovamen/vuepress-plugin-mermaid'
    ]
  ]
}

# Usage

The token info of the code block should be mermaid, for example:

sequenceDiagram Alice->John: Hello John, how are you? loop Every minute John-->Alice: Great! end
Code
```mermaidjs
sequenceDiagram
  Alice->John: Hello John, how are you?
  loop Every minute
    John-->Alice: Great!
  end
```

Refer to the documentation of Mermaid for more information.

# License

MIT