From 6eadf8d4f4a5cfb03886b4d8eeb464a538a8f8b4 Mon Sep 17 00:00:00 2001 From: teldra Date: Tue, 5 Apr 2022 11:18:45 +0200 Subject: [PATCH] small fixes --- themes/buha/layouts/_default/rss.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/themes/buha/layouts/_default/rss.xml b/themes/buha/layouts/_default/rss.xml index 3c01a82..c24db9e 100644 --- a/themes/buha/layouts/_default/rss.xml +++ b/themes/buha/layouts/_default/rss.xml @@ -30,9 +30,9 @@ {{ printf "" .Permalink .MediaType | safeHTML }} {{- end -}} {{ range where $pages "Type" "in" .Site.Params.searchSections }} - {{ $when := "" }} - {{ if and (ne .Params.when "") (ne .Params.when nil) }} - {{ $when = .Params.when }} + {{ $when := .Params.when }} + {{ with $when }} + {{ $when }} {{ end }} {{ .Title }} @@ -41,9 +41,9 @@ {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} {{ .Permalink }}-{{ .Lastmod }} - {{ if and (ne $when "") (ne $when nil) }}{{ printf "%s

]]>" $when | safeHTML }}{{ end }} + {{ if $when }}{{ printf "%s

]]>" $when | safeHTML }}{{ end }} - {{ printf "" .Content | safeHTML }} + {{ printf "" .Content | plainify }} {{ $img := index (.Resources.ByType "image") 0 }} {{ with $img }} {{ $img := .Resize "640x" }}