Mermaid is a markdown dialetc and a JavaScript library that is just a fantastic toolkit. It supports creating diagrams as code. When you host your markdown on github.com or use Visual Studio Code it renders well using the approach below (and there are an increasing number of integrations with other platforms). It has features to support a range of diagramming types.
Here is a Mermaid block:
code
'''mermaid
graph TD;
Root-->Node1;
Node1-->Node3;
Node1-->Node2;
Root-->Node2;
Node2-->Node3;
'''
renders as
graph TD;
Root-->Node1;
Node1-->Node3;
Node1-->Node2;
Root-->Node2;
Node2-->Node3;
- Mermaid JS https://github.com/mermaid-js/mermaid/releases/latest
- Mermaid integrations https://github.com/mermaid-js/mermaid/blob/develop/docs/integrations.md
- Mermaid server https://github.com/TomWright/mermaid-server
- Linux Format Article: "Dynamic diagrams with Mermaid." by Mihalis Tsoukalos - source code available at https://www.linuxformat.com/archives?issue=274
- Also see Mermaid-Server by Tom Wright https://github.com/TomWright/mermaid-server