mirror of
https://github.com/docker/docs.git
synced 2026-10-23 18:09:02 +03:00
Adds a Hugo codeblock render hook that turns ```mermaid fences into <pre class="mermaid"> containers, plus a lazily-loaded mermaid bundle that only ships on pages that actually contain a diagram. Mirrors the existing YouTube embed pattern (Store flag + conditional script tag in baseof) so the main scripts.js bundle stays unchanged.
6 lines
157 B
HTML
6 lines
157 B
HTML
{{- .Page.Store.Set "mermaid" true -}}
|
|
<pre
|
|
class="mermaid not-prose my-4 flex justify-center bg-transparent"
|
|
data-pagefind-ignore
|
|
>{{- .Inner -}}</pre>
|