From 6c251b8bdcb0696e59ab88a7d20d7fdbf94869dc Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Thu, 31 Aug 2023 23:32:33 +0200 Subject: [PATCH] add caption option Signed-off-by: Toshaan Bharvani --- themes/openpowerfoundation/layouts/shortcodes/image.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/themes/openpowerfoundation/layouts/shortcodes/image.html b/themes/openpowerfoundation/layouts/shortcodes/image.html index 4225d9e..dfb08f6 100644 --- a/themes/openpowerfoundation/layouts/shortcodes/image.html +++ b/themes/openpowerfoundation/layouts/shortcodes/image.html @@ -12,4 +12,9 @@ {{ $imageprocessing := (printf "%sx%s %s" $width $height "webp") }} {{ $image := $imageresource.Fit $imageprocessing }} +{{ with .Get "caption" }} +
+{{ . }} +
+{{ end }}