From 57ca3ea776a5f64ec1439056f8b9d519616f2b3f Mon Sep 17 00:00:00 2001 From: earnest ma Date: Tue, 26 Apr 2022 10:05:09 -0400 Subject: [PATCH] Modify figure shortcode to not show title in figcaption title in img, title -> figtitle --- layouts/shortcodes/figure.html | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 layouts/shortcodes/figure.html diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html new file mode 100644 index 0000000..e34d5f1 --- /dev/null +++ b/layouts/shortcodes/figure.html @@ -0,0 +1,29 @@ + + {{- if .Get "link" -}} + + {{- end -}} + {{ with .Get + {{- if .Get "link" }}{{ end -}} + {{- if or (or (.Get "figtitle") (.Get "caption")) (.Get "attr") -}} +
+ {{ with (.Get "figtitle") -}} +

{{ . }}

+ {{- 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