mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-12-13 02:11:07 +01:00
10 lines
No EOL
432 B
HTML
10 lines
No EOL
432 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> |