From d6e5c2a9788312492dbc01e42dfd2d92a11e7548 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 24 Sep 2023 08:45:47 -0700 Subject: [PATCH] Only add a figcaption to the figures/image shortcode if the Title is non-empty --- layouts/shortcodes/figures/image.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/shortcodes/figures/image.html b/layouts/shortcodes/figures/image.html index 3fa21b3..14fe93c 100644 --- a/layouts/shortcodes/figures/image.html +++ b/layouts/shortcodes/figures/image.html @@ -30,7 +30,9 @@ {{ if and $shouldShowTitle -}} {{- range $imgs -}} -
{{ .Title }}
+ {{- if gt (len .Title) 0 -}} +
{{ .Title }}
+ {{- end -}} {{- end -}} {{- end }}