From b2ae28fefff4076a1c52e5e3792d90252e975763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wro=CC=81bel?= Date: Mon, 27 May 2024 19:07:34 +0200 Subject: [PATCH] Use image partial to render figure shortcut --- layouts/shortcodes/figure.html | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 8c93effe..81bc8394 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -5,27 +5,6 @@ {{- if .Get "link" -}} {{- end }} - {{ with .Get + {{ partial "image.html" (merge .Params (dict "page" .Page "lazy" true)) }} {{- if .Get "link" }}{{ end -}} - {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} -
- {{ with (.Get "title") -}} - {{ . }} - {{- end -}} - {{- if or (.Get "caption") (.Get "attr") -}}

- {{- .Get "caption" | markdownify -}} - {{- with .Get "attrlink" }} - - {{- end -}} - {{- .Get "attr" | markdownify -}} - {{- if .Get "attrlink" }}{{ end }}

- {{- end }} -
- {{- end }}