Only add a figcaption to the figures/image shortcode if the Title is non-empty

This commit is contained in:
Eryn Wells 2023-09-24 08:45:47 -07:00
parent 162e17339c
commit d6e5c2a978

View file

@ -30,7 +30,9 @@
</div>
{{ if and $shouldShowTitle -}}
{{- range $imgs -}}
<figcaption>{{ .Title }}</figcaption>
{{- if gt (len .Title) 0 -}}
<figcaption>{{ .Title }}</figcaption>
{{- end -}}
{{- end -}}
{{- end }}
</figure>