~ruther/blog

blog/themes/poison/layouts/shortcodes/plantuml.html -rw-r--r-- 613 bytes
1e4dd2e3 — Rutherther chore: add rsync 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" }}">