Skip to content

Commit 7de2f34

Browse files
committed
Hits about plugin installation and usage
1 parent fa02be8 commit 7de2f34

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,32 @@
1-
Mermaid plugin for GitBook
2-
==============
1+
## Mermaid plugin for GitBook
2+
[![Build Status](https://travis-ci.org/JozoVilcek/gitbook-mermaid-plugin.svg?branch=master)](https://travis-ci.org/JozoVilcek/gitbook-mermaid-plugin)
3+
4+
Plugin for [GitBook](https://github.com/GitbookIO/gitbook) which renders [Mermaid](https://github.com/knsv/mermaid) diagrams and flow charts detected in the book markdown.
5+
6+
### How to install it?
7+
8+
You can use install via **NPM**:
9+
10+
```
11+
$ npm install gitbook-mermaid-plugin
12+
```
13+
14+
And use it for your book with in the book.json:
15+
16+
```
17+
{
18+
"plugins": ["gitbook-mermaid"]
19+
}
20+
```
21+
22+
### How to use it?
23+
24+
Just put the code into fenced code block and tag it **mermaid** key word like this:
25+
```mermaid
26+
graph TD;
27+
A-->B;
28+
A-->C;
29+
B-->D;
30+
C-->D;
31+
```
32+
Plugin will pick it up and pack into properly marked div element, where it can be found by mermaid client side rendering.

0 commit comments

Comments
 (0)