D2 is a modern language that turns text to diagrams.
Installation
Usage
Inline diagram
1 2 3 4 5 6 7
| {% d2 %} z: @_d2/local.d2
a -> b b -> c a <- c {% endd2 %}
|
From file
1
| {% d2_file diagram.d2 %}
|
Using this tag will not update the diagram when editing the d2
file. You should also re-save the markdown file or restart the server.
Apply styles
1
| {% d2_file diagram.d2 style="max-width: 200px" %}
|
Using this tag will not update the diagram when editing the d2
file. You should also re-save the markdown file or restart the server.