render chart caption templates

This commit is contained in:
Ben Goldsworthy 2025-02-21 23:17:58 +01:00
parent aee1770a01
commit 44cb516ff6
Signed by: Rumperuu
SSH key fingerprint: SHA256:v3uompaUiPqV2w1/AIRWBSQOxr2dntH9Xs/y8fDnUPU

View file

@ -32,7 +32,7 @@
{{- if or ( .Get "caption" ) ( .Get "title" ) -}} {{- if or ( .Get "caption" ) ( .Get "title" ) -}}
<figcaption class="figure__caption{{ if not ( or ( .Get "caption" ) ( .Get "title" ) ) }}figure__caption--no-height{{ end }}"> <figcaption class="figure__caption{{ if not ( or ( .Get "caption" ) ( .Get "title" ) ) }}figure__caption--no-height{{ end }}">
{{- with .Get "title" -}}<h4 class="figcaption__title">{{ . | markdownify | safeHTML }}</h4>{{- end -}} {{- with .Get "title" -}}<h4 class="figcaption__title">{{ . | markdownify | safeHTML }}</h4>{{- end -}}
{{- with .Get "caption" -}}<p class="figcaption__caption">{{ . | markdownify | safeHTML }}</p>{{- end -}} {{- with .Get "caption" -}}<p class="figcaption__caption">{{ . | $.Page.RenderString }}</p>{{- end -}}
</figcaption> </figcaption>
{{- end -}} {{- end -}}
</figure> </figure>