mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-15 19:36:20 +01:00
10 lines
424 B
HTML
10 lines
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>
|