~ruther/blog

ref: b8ec0e6881318f4adbd4ae68277a540c0eacf203 blog/themes/poison/layouts/shortcodes/plantuml.html -rw-r--r-- 613 bytes
b8ec0e68 — Rutherther Initial commit 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
<!-- Locally hosted code for PlantUML diagrams -->
{{ if ne (.Page.Scratch.Get "hasPlantUML") true }}
{{ $js_bundle :=
    slice
        (resources.Get "js/lib/plantuml-encoder.js")
        (resources.Get "js/plantuml-encoder.js")
    | resources.Concat "js/plantuml-bundle.js" | minify | fingerprint }}
<script language="javascript" type="text/javascript" src="{{ $js_bundle.RelPermalink }}"></script>
{{ .Page.Scratch.Set "hasPlantUML" true }}
{{ end }}

<span id="plantuml-{{ .Get "id" }}" style="display:none">{{ .Inner | safeHTML | htmlUnescape }}</span>
<img class="plantuml" id="plantuml-{{ .Get "id" }}">