From 0724988e4ddc293388b0aa478402b04246ba5e32 Mon Sep 17 00:00:00 2001 From: Marco Blessing Date: Thu, 15 Apr 2021 11:47:33 +0200 Subject: [PATCH 1/2] enable using .Inner for complex text --- layouts/shortcodes/alert.html | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/layouts/shortcodes/alert.html b/layouts/shortcodes/alert.html index 4c55d13..0d0205b 100644 --- a/layouts/shortcodes/alert.html +++ b/layouts/shortcodes/alert.html @@ -1,4 +1,12 @@ \ No newline at end of file +
{{ with .Get "icon" }}{{.}} {{ end }}
+ {{ with .Get "text"}} +
{{ . }}
+ {{ else }} + {{ with .Inner}} +
{{ . | markdownify}}
+ {{ else }} + {{ errorf "No valid text variable or Inner content given"}} + {{ end }} + {{ end}} + From c7ebe71f11aef421a1e41a6be2f02a0ab0abbd20 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Tue, 20 Apr 2021 08:19:52 +0200 Subject: [PATCH 2/2] restore missing safeHTML --- layouts/shortcodes/alert.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/shortcodes/alert.html b/layouts/shortcodes/alert.html index 0d0205b..7cc7eb0 100644 --- a/layouts/shortcodes/alert.html +++ b/layouts/shortcodes/alert.html @@ -1,7 +1,7 @@