Hacker News new | ask | show | jobs
by sandGorgon 2225 days ago
can such a diagram be generated using text markup ? i want to have this in revision control and then generate this in a static page (Nextjs or Gatsbyjs)
2 comments

It’s a bit clunky, but Graphviz and its DOT language[1] might do the trick.

[1] https://en.m.wikipedia.org/wiki/Graphviz

mermaidjs [0] can do class diagrams that look kind of like this. It integrates into markdown via Jekyll easily, so I assume it will work well with gatsby.

It’s a basic text only structure so it actually diffs pretty well so I can see a merge request with a new node or new relationship.

[0] https://mermaid-js.github.io/mermaid/#/