From 511cd749103f6ec177d7d3fc06b20eb6fc265ecb Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Sun, 21 May 2017 23:36:32 +0200 Subject: [PATCH] Custom shortcode for figure, claning up whitespace. More custom stuff to come. --- layouts/shortcodes/figure.html | 16 ++++++++++++++++ 1 file changed, 16 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..4f8dbfd --- /dev/null +++ b/layouts/shortcodes/figure.html @@ -0,0 +1,16 @@ +
+{{ with .Get "link" }}{{ end -}} + +{{- if .Get "link" }}{{ end }} +{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} +
{{ if isset .Params "title" }} +

{{ .Get "title" }}

{{ end }} +{{ if or (.Get "caption") (.Get "attr") -}} +

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

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