It should be easy to add diagrams to your markdown documentation. There are a lot of solutions which can render diagrams inside markdown, for example, see asciidoctor.
But if you want to add custom diagram it can be tedious to implement. Core idea: if you have function that can produce diagram as SVG it should be trivial to use it in Astro (or other SSG that uses remark/rehype).
It should be easy to create documentation with a lot of diagrams, like in Byrne's Elements of Euclid.
I implemented core packages and added some examples. But I still need to add more tests, configure CI, create demo site and fix all the rest of TODOs
rehype | Astro | |
---|---|---|
Graphviz | @beoe/rehype-graphviz | |
Mermaid | @beoe/rehype-mermaid | |
Gnuplot | @beoe/rehype-gnuplot | |
penrose | ||
... |
Ideas for other diagrams: https://stereobooster.com/posts/text-to-diagram/.
Logo is an illustration from Oliver Byrne's Elements of Euclid: The First Six Books with Coloured Diagrams and Symbols.