diff --git a/content/en/content-management/diagrams.md b/content/en/content-management/diagrams.md index 4e3f6164b..e503e7717 100644 --- a/content/en/content-management/diagrams.md +++ b/content/en/content-management/diagrams.md @@ -12,8 +12,70 @@ toc: true --- +{{< new-in "0.93.0" >}} + + +## GoAT Diagrams (Ascii) + +Hugo supports [GoAT](https://github.com/bep/goat) natively. This means that this code block: + +``` + ```goat + + .---. .-. .-. .-. .-. + | A +----->| 1 +<---->| 2 |<----+ 4 +------------------. | 8 | + '---' '-' '+' '-' | '-' + | ^ | ^ + v | v | + .-. .-+-. .-. .-+-. .-. .+. .---. + | 3 +---->| B |<----->| 5 +---->| C +---->| 6 +---->| 7 |<---->| D | + '-' '---' '-' '---' '-' '-' '---' + ``` +``` + +Will be rendered as: + +```goat + + .---. .-. .-. .-. .-. + | A +----->| 1 +<---->| 2 |<----+ 4 +------------------. | 8 | + '---' '-' '+' '-' | '-' + | ^ | ^ + v | v | + .-. .-+-. .-. .-+-. .-. .+. .---. + | 3 +---->| B |<----->| 5 +---->| C +---->| 6 +---->| 7 |<---->| D | + '-' '---' '-' '---' '-' '-' '---' +``` + + + + + ## Mermaid Diagrams +Hugo currently does not provide default templates for Mermaid diagrams. But you can easily add your own. One way to do it would be to create ` layouts/_default/_markup/render-codeblock-mermaid.html`: + + +```go-html-template +