Statically compile diagrams for blog posts in Markdown

Blog posts now support inline diagrams authored in D2 1 . Why D2 Like most people, I reached for Mermaid first. I didn’t want to add a JavaScript dependency though. D2 is a modern approach to diagrams, and has some nice things like supporting light and dark mode. How it works A custom MDEx 2 pipeline plugin walks the document AST at compile time, finds every fenced code block tagged d2 , and…