From 8f79d2af3a370b560cbf2c0f48c6c972e2028b6c Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Sun, 27 Jul 2025 01:44:08 -0500 Subject: [PATCH] Allow using positional parameter for figure caption --- layouts/_shortcodes/figure.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_shortcodes/figure.html b/layouts/_shortcodes/figure.html index 8bac195..e34f52a 100644 --- a/layouts/_shortcodes/figure.html +++ b/layouts/_shortcodes/figure.html @@ -10,7 +10,7 @@ {{ end }} {{ else }} {{ .Inner }} - {{ with .Get "caption" }} + {{ with or (.Get "caption") (.Get 0) }}
{{ . | markdownify }}
{{ end }} {{ end }}