0%

D2

D2 is a modern language that turns text to diagrams.

Installation

1
npm install hexo-tag-d2

Usage

Inline diagram

1
2
3
4
5
6
7
{% d2 %}
z: @_d2/local.d2

a -> b
b -> c
a <- c
{% endd2 %}
zabcab

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.

zabcab Prueba máxima