1
Fork 0
theorangeone.net-legacy/layouts/shortcodes/mermaid.html
Jake Howard 822198a7df
Add noreferrer to image tags
This doesn't cover the magical div ones, but it's a start
2021-02-06 23:09:10 +00:00

10 lines
336 B
HTML

{{ $mermaidData := dict "theme" "default" }}
{{ $data := dict "code" .Inner "mermaid" $mermaidData }}
<figure class="mermaid">
<img src="https://mermaid.ink/img/{{ $data | jsonify | base64Encode }}" referrerpolicy="no-referrer" />
<figcaption class="text-center">
<small>{{ .Get "caption" }}</small>
</figcaption>
</figure>