1
Fork 0

Add alt text to mermaid embed

This commit is contained in:
Jake Howard 2021-12-27 11:01:18 +00:00
parent 1ef53bb45b
commit 27fc575c12
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -3,7 +3,7 @@
{{ $data := dict "code" .Inner "mermaid" $mermaidData }} {{ $data := dict "code" .Inner "mermaid" $mermaidData }}
<figure class="mermaid"> <figure class="mermaid">
<img src="https://mermaid.ink/img/{{ $data | jsonify | base64Encode }}" referrerpolicy="no-referrer" decoding="async" loading="lazy" /> <img src="https://mermaid.ink/img/{{ $data | jsonify | base64Encode }}" referrerpolicy="no-referrer" decoding="async" loading="lazy" alt='{{ .Get "caption" }}' />
<figcaption class="text-center"> <figcaption class="text-center">
<small>{{ .Get "caption" }}</small> <small>{{ .Get "caption" }}</small>
</figcaption> </figcaption>