Goldmark D2 is a Goldmark extension providing diagram support through D2.
goldmark.New(
goldmark.WithExtensions(&Extender{
// Defaults when omitted
Layout: d2dagrelayout.Layout,
ThemeID: d2themescatalog.CoolClassics.ID,
}),
).Convert(src, dst)
The following diagram shows the important link between the letters X and Y:
```d2
x -> y
``` |
|
{Sketch: true} ```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
}
}
``` |
- Option for hand-drawn rendering