mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-12-03 05:26:42 +01:00
10 lines
No EOL
424 B
HTML
10 lines
No EOL
424 B
HTML
<!-- shuffle md5 as id -->
|
|
{{ $id := delimit (split (md5 .Inner) "" | shuffle) "" | printf "mermaid-%s" -}}
|
|
{{ $mermaidMap := .Page.Scratch.Get "mermaidMap" -}}
|
|
{{ if $mermaidMap -}}
|
|
{{ $mermaidMap = trim .Inner "\n" | dict $id | merge $mermaidMap -}}
|
|
{{ else -}}
|
|
{{ $mermaidMap = trim .Inner "\n" | dict $id -}}
|
|
{{ end -}}
|
|
{{ .Page.Scratch.Set "mermaidMap" $mermaidMap -}}
|
|
<div class="mermaid" id="{{ $id }}"></div> |