LoveIt/layouts/shortcodes/mermaid.html
2020-02-27 20:14:40 +08:00

5 lines
235 B
HTML

{{- $scratch := .Page.Scratch.Get "scratch" -}}
{{- $id := partial "function/id.html" (dict "content" (trim .Inner "\n") "scratch" $scratch) -}}
<div class="mermaid" id="{{ $id }}"></div>
{{- slice $id | $scratch.Add "mermaidArr" -}}