Only add a figcaption to the figures/image shortcode if the Title is non-empty
This commit is contained in:
parent
162e17339c
commit
d6e5c2a978
1 changed files with 3 additions and 1 deletions
|
@ -30,7 +30,9 @@
|
||||||
</div>
|
</div>
|
||||||
{{ if and $shouldShowTitle -}}
|
{{ if and $shouldShowTitle -}}
|
||||||
{{- range $imgs -}}
|
{{- range $imgs -}}
|
||||||
<figcaption>{{ .Title }}</figcaption>
|
{{- if gt (len .Title) 0 -}}
|
||||||
|
<figcaption>{{ .Title }}</figcaption>
|
||||||
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</figure>
|
</figure>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue