• Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    CSS
  • License
    Apache License 2.0
  • Created almost 10 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mermaid plugin for GitBook

Build Status NPM version

Note: Plugin is not actively maintained

Plugin for GitBook which renders Mermaid diagrams and flow charts detected in the book markdown.

How to install it?

You can use install via NPM:

$ npm install gitbook-plugin-mermaid

And use it for your book with in the book.json:

{
    "plugins": ["mermaid"]
}

How to use it?

There are two options how can be graph put into the gitbook. To use embedded graph, put in your book block as:

{% mermaid %}
graph TD;
  A-->B;
  A-->C;
  B-->D;
  C-->D;
{% endmermaid %}

Plugin will pick up block body and replace it with generated svg diagram. To load graph from file, put in your book block as:

{% mermaid src="./diagram.mermaid" %}
{% endmermaid %}

If not absolute, plugin will resolve path given in src attribute relative to the current book page, load its content and generate svg diagram.

More Repositories