small fixes

This commit is contained in:
teldra 2022-04-05 11:05:52 +02:00
parent a186efa6f2
commit 6d47d42d3a

View File

@ -30,6 +30,10 @@
{{ 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 }}
{{ end }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
@ -37,6 +41,8 @@
{{ 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 }}
{{ printf "<![CDATA[%s]]>" .Content | safeHTML }}
{{ $img := index (.Resources.ByType "image") 0 }}
{{ with $img }}