import mermaid from "/vendor/mermaid/mermaid.esm.min.mjs"; const diagrams = document.querySelectorAll('pre code[data-lang="mermaid"]'); for (const code of diagrams) { const diagram = document.createElement("div"); diagram.className = "mermaid"; diagram.textContent = code.textContent; code.parentElement.replaceWith(diagram); } mermaid.initialize({ startOnLoad: false, theme: "neutral", fontFamily: "Comic Neue", }); await mermaid.run(); window.MathJax = { loader: { paths: { fonts: "/vendor/fonts" } }, output: { font: "mathjax-fira" }, chtml: { matchFontHeight: false }, }; const script = document.createElement("script"); script.src = "/vendor/mathjax/tex-chtml-nofont.js"; document.head.append(script);