I’m happy to report that you no longer need JavaScript to see rendered KaTeX expressions and Mermaid diagrams in my blog posts! I wrote a script aftermath that post-processes my blog posts to compile the following to SVGs at build-time:

  • KaTeX expressions (using the same settings as the auto-render extension that runs in the browser)
  • Mermaid diagrams (using the same settings as Mermaid in the browser)
  • D2 diagrams

Check out the aftermath README for more details!

Example Mermaid diagram:

UserGiteaFly Remote BuilderMy Fly AppBuilding image…Push ref(s)???Deploys new versionUserGiteaFly Remote BuilderMy Fly App

Example KaTeX:

a=b2+c2a = \sqrt{b^2 + c^2}

Example D2:

foobar