0.3.0 • Published 1 year ago

rspress-plugin-mermaid v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

rspress-plugin-mermaid NPM Version

简体中文

Rspress plugin to render mermaid diagrams in markdown files.

Write mermaid as code blocks in markdown files and they will be rendered as SVGs:

```mermaid
flowchart TD
    A[Christmas] -->|Get money| B(Go shopping)
    B --> C{Let me think}
    C -->|One| D[Laptop]
    C -->|Two| E[iPhone]
    C -->|Three| F[fa:fa-car Car]
```

Usage

npm i rspress-plugin-mermaid
pnpm add rspress-plugin-mermaid
import * as path from 'path';
import { defineConfig } from 'rspress/config';
import mermaid from 'rspress-plugin-mermaid';

export default defineConfig({
  root: path.join(__dirname, 'docs'),
  plugins: [mermaid()],
});

Configure

mermaidConfig

Mermaid configuration options, will be passed to mermaid.initialize function. See mermaid documentation for more details.

  • Type: object
import * as path from 'path';
import { defineConfig } from 'rspress/config';
import mermaid from 'rspress-plugin-mermaid';

export default defineConfig({
  root: path.join(__dirname, 'docs'),
  plugins: [
    mermaid({
      mermaidConfig: {
        theme: 'forest',
      },
    }),
  ],
});
0.3.0

1 year ago

0.2.0

1 year ago

0.1.5-beta.0

1 year ago

0.1.2-beta.0

1 year ago

0.1.1

1 year ago

0.1.4

1 year ago

0.1.4-beta.0

1 year ago

0.1.3-beta.0

1 year ago

0.1.0

1 year ago