Doctave supports Mermaid JS diagrams out of the box. All you need
to do is specify the mermaid
language for your codeblock, and Doctave will render the diagram for
you.
Diagram types supported include
Specify mermaid as your code block language:
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```
and see your graph rendered as follows:
If you are not familiar with Mermaid JS, we suggest taking a look at their tutorials and playing around with their live editor.
Below are a few examples to get you started if you want to play around with the Mermaid syntax.
```mermaid
pie title Favorite pie flavor
"Lemon" : 2
"Apple" : 3
"Blueberry" : 5.6
```
```mermaid
sequenceDiagram
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
Bob-->Alice: Checking with John...
Alice->John: Yes... John, how are you?
```
```mermaid
stateDiagram-v2
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
```
Powered by Doctave