<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Svg - Tag - arleo.eu</title><link>https://www.arleo.eu/en/tags/svg/</link><description>Svg - Tag - arleo.eu</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 29 May 2026 20:00:00 +0200</lastBuildDate><atom:link href="https://www.arleo.eu/en/tags/svg/" rel="self" type="application/rss+xml"/><item><title>Hugo: freezing Mermaid diagrams to static dark/light SVGs</title><link>https://www.arleo.eu/en/posts/debug-mermaid-svg-freeze/</link><pubDate>Fri, 29 May 2026 20:00:00 +0200</pubDate><author>Jmr</author><guid>https://www.arleo.eu/en/posts/debug-mermaid-svg-freeze/</guid><description><![CDATA[<div class="featured-image">
                <img src="/images/debug-mermaid-svg-freeze-featured.jpg" referrerpolicy="no-referrer">
            </div><h2 id="problem">Problem</h2>
<p>Mermaid diagrams on arleo.eu were rendering client-side via <code>cdn.jsdelivr.net</code>. Three concrete consequences:</p>
<ol>
<li><strong>CSP constraint</strong> — <code>script-src cdn.jsdelivr.net</code> and <code>worker-src cdn.jsdelivr.net</code> become mandatory (Mermaid v11 uses Web Workers for its parsers).</li>
<li><strong>Render flash</strong> — the diagram appears after JS execution, creating a visible delay.</li>
<li><strong>Dark theme ignored</strong> — Mermaid initialized the SVG in light mode even when the site theme was dark.</li>
</ol>
<p>The solution: generate SVGs <strong>at build time</strong> with <code>mmdc</code>, outside any browser context.</p>]]></description></item></channel></rss>