From 46dd39d9e7723ec3a485b31d13e80fa8bc00e41e Mon Sep 17 00:00:00 2001 From: vjeantet Date: Wed, 30 Sep 2020 21:50:41 +0200 Subject: fix some shortcodes --- layouts/shortcodes/alert.html | 2 +- layouts/shortcodes/excerpt.html | 5 +++-- layouts/shortcodes/expand.html | 15 +++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/layouts/shortcodes/alert.html b/layouts/shortcodes/alert.html index 0e1c417..66a4902 100644 --- a/layouts/shortcodes/alert.html +++ b/layouts/shortcodes/alert.html @@ -4,4 +4,4 @@ {{- with .Get "theme" -}}{{.}}{{- else -}}info{{- end -}} {{- else -}} {{- with .Get 0 -}}{{.}}{{- else -}}info{{- end -}} -{{- end -}} " role="alert">{{- .Inner | safeHTML -}} +{{- end -}} " role="alert">{{- .Inner | safeHTML | markdownify -}} diff --git a/layouts/shortcodes/excerpt.html b/layouts/shortcodes/excerpt.html index 7d0eb33..bc09f47 100644 --- a/layouts/shortcodes/excerpt.html +++ b/layouts/shortcodes/excerpt.html @@ -1,7 +1,8 @@ + {{with .Get "hidden"}} {{if eq . "false"}} - {{$.Inner}} + {{$.Inner | safeHTML}} {{end}} {{else}} - {{.Inner}} + {{.Inner | safeHTML}} {{end}} \ No newline at end of file diff --git a/layouts/shortcodes/expand.html b/layouts/shortcodes/expand.html index 3a1e8a7..dd3007a 100644 --- a/layouts/shortcodes/expand.html +++ b/layouts/shortcodes/expand.html @@ -1,17 +1,16 @@ -{{ $_hugo_config := `{ "version": 1 }` }}
- {{$expandMessage := T "Expand-title"}} - {{ if .IsNamedParams }} - {{.Get "default" | default $expandMessage}} - {{else}} - {{.Get 0 | default $expandMessage}} - {{end}} + {{- $expandMessage := T "Expand-title" -}} + {{- if .IsNamedParams -}} + {{- .Get "default" | default $expandMessage -}} + {{- else -}} + {{- .Get 0 | default $expandMessage -}} + {{- end -}}
\ No newline at end of file -- cgit v1.2.3