From d7df1c7a2850c0cff38f309882564782b49186f1 Mon Sep 17 00:00:00 2001 From: tdro Date: Fri, 18 Nov 2022 17:33:34 -0500 Subject: themes/default/layouts/shortcodes: Generalize content warnings with disclose short code --- themes/default/layouts/shortcodes/disclose.html | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 themes/default/layouts/shortcodes/disclose.html (limited to 'themes/default/layouts/shortcodes') diff --git a/themes/default/layouts/shortcodes/disclose.html b/themes/default/layouts/shortcodes/disclose.html new file mode 100644 index 0000000..fdbcc6a --- /dev/null +++ b/themes/default/layouts/shortcodes/disclose.html @@ -0,0 +1,6 @@ +{{- $text := default "Content Warning: " (.Get "text" | default (.Get 0)) -}} + +
+ {{ (or $.Page.Params.title $text) | markdownify }} +
+{{- /* This comment removes trailing newlines and white spaces. */ -}} -- cgit v1.2.3