Documentation Guides

D2 diagrams #

D2 is a diagram scripting language that turns text to diagrams. It stands for Declarative Diagramming. Declarative, as in, you describe what you want diagrammed, it generates the image.

Configuration #

Must be enabled in configuration (default):

[output.html]
+d2-support = true

Example of a D2 diagram #

dogscatsmicereplica 1replica 2ab chasechase To err is human, to moo bovine1*

Representation in markdown #

```d2
dogs -> cats -> mice: chase
replica 1 <-> replica 2
a -> b: To err is human, to moo bovine {
  source-arrowhead: 1
  target-arrowhead: * {
    shape: diamond
  }
}
```