From fb3a264479d770c88ca9b5d4a8a4fe320e3889c3 Mon Sep 17 00:00:00 2001 From: Maik de Kruif Date: Fri, 24 Sep 2021 09:59:11 +0200 Subject: [PATCH] Allow adding an id to a figure --- .../maik-blog/layouts/shortcodes/figure.html | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 themes/maik-blog/layouts/shortcodes/figure.html diff --git a/themes/maik-blog/layouts/shortcodes/figure.html b/themes/maik-blog/layouts/shortcodes/figure.html new file mode 100644 index 0000000..5979862 --- /dev/null +++ b/themes/maik-blog/layouts/shortcodes/figure.html @@ -0,0 +1,26 @@ + + {{- if .Get "link" -}} + + {{- end -}} + {{ with .Get + + {{- 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 }} + \ No newline at end of file