Generate Kroki diagrams by using shortcode.
Become a backer or sponsor to support our work.
1{{< kroki _type=[type] >}}
2DIAGRAM
3{{< /kroki >}}
It’s similar to the usage of code block.
1{{< kroki _type=[type] _name=[name] />}}
_name| Position | Name | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
| - | _name | string | - | - | - | - |
The name of diagram file, site’s resource and page’s resource are supported.
_type| Position | Name | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
| - | _type | string | ✓ | - | - | - |
The diagram type, such as blockdiag, bpmn, bytefield, seqdiag, actdiag, nwdiag, packetdiag, rackdiag, c4plantuml, d2, dbml, ditaa, erd, excalidraw, graphviz, mermaid, nomnoml, pikchr, plantuml, structurizr, svgbob, symbolator, tikz, vega, vegalite, wavedrom, wireviz.
_output| Position | Name | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
| - | _output | string | - | inline | - | - |
The type of output: inline, embed, img, object.
You can set any attributes for diagrams, such as id, class and data-*.
1digraph G {Hello->World}
1{{< kroki _type="graphviz" _name="diagrams/hello.dot" >}}1graph TD
2 A[ Anyone ] -->|Can help | B( Go to github.com/yuzutech/kroki )
3 B --> C{ How to contribute? }
4 C --> D[ Reporting bugs ]
5 C --> E[ Sharing ideas ]
6 C --> F[ Advocating ]
1{{< kroki _type="mermaid" _name="diagrams/mermaid.dot" >}}