Graphviz diagram
Example taken here
About
Graphviz is open source graph visualization software. On the one hand it is general diagraming tool, so it doesn’t have DSL to directly express specific diagrams (let’s say Hasse diagram or ER diagram). On the other hand if you don’t have better solution you can always bend Graphviz to desired diagram (though it can be tedious sometimes).
Installation
-
Install dependencies
-
Configure Astro. See note about Rehype plugins for code.
-
Optional install dependency for cache
-
Optional configure cache
-
Optional add pan and zoom for diagrams
Tips
Dark mode
Basic dark mode can be implemented with:
Plus you can pass class
to Edges and Nodes to implement advanced dark mode.
To remove background
To remove background use bgcolor="transparent"
Example
Compare it to similar example in Mermaid