From 59f648989abbfa76a3b3b760c1a99736e7f92491 Mon Sep 17 00:00:00 2001 From: jtagcat Date: Fri, 14 Aug 2020 14:08:09 +0300 Subject: [PATCH] Added shortcode for collapsing texts. --- layouts/shortcodes/collapse.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 layouts/shortcodes/collapse.html diff --git a/layouts/shortcodes/collapse.html b/layouts/shortcodes/collapse.html new file mode 100644 index 0000000..b92ad01 --- /dev/null +++ b/layouts/shortcodes/collapse.html @@ -0,0 +1,12 @@ +{{ if .Get "content" }} +{{ if .Get "summary" }} +{{ else }} +{{ warnf "missing value for param 'summary': %s" .Position }} +{{ end }} +{{ else }} +{{ errorf "missing value for param 'content': %s" .Position }} +{{ end }} +

+ {{ .Get "summary" | markdownify }} + {{ .Get "content" | markdownify }} +