small fixes

This commit is contained in:
teldra 2022-04-05 11:18:45 +02:00
parent 6d47d42d3a
commit 6eadf8d4f4

View File

@ -30,9 +30,9 @@
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .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 }}
<item>
<title>{{ .Title }}</title>
@ -41,9 +41,9 @@
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}-{{ .Lastmod }}</guid>
<description>
{{ if and (ne $when "") (ne $when nil) }}{{ printf "<![CDATA[<p>%s</p>]]>" $when | safeHTML }}{{ end }}
{{ if $when }}{{ printf "<![CDATA[<p><b>%s</b></p>]]>" $when | safeHTML }}{{ end }}
{{ printf "<![CDATA[%s]]>" .Content | safeHTML }}
{{ printf "<![CDATA[%s]]>" .Content | plainify }}
{{ $img := index (.Resources.ByType "image") 0 }}
{{ with $img }}
{{ $img := .Resize "640x" }}