fix atom feed

This commit is contained in:
teldra 2022-06-24 02:35:36 +02:00
parent 88ddb46286
commit 97fd6f12ad

View File

@ -20,7 +20,7 @@
<name>{{.}}</name>{{ with $.Site.Author.email }}
<email>{{.}}</email>{{end}}
</author>{{end}}
<generator>Hugo -- gohugo.io</generator>{{ range $pages }}
<generator>Hugo -- gohugo.io</generator>{{ range $pages.ByLastmod.Reverse }}
<entry>
{{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title>
<link href="{{ .Permalink }}"/>
@ -31,7 +31,17 @@
<published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published>
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
{{ if .Content }}
{{ `<content type="html"><![CDATA[` | safeHTML }}{{ .Content }}]]></content>
{{ `<content type="html"><![CDATA[` | safeHTML }}
{{ .Content }}
{{ $c := .Content }}
{{ $alink := .Permalink }}
{{ range .Resources.ByType "image" }}
{{ if and (not (in $c .Name)) (not (in .Name "banner")) }}
{{ .Name }}
<a href="{{ $alink }}" class="article_image no_underline"> <img loading="lazy" src="{{ .Permalink }}" alt="lala" width=780 height="520" /><br> lala </a>
{{ end }}
{{ end }}
]]></content>
{{ end }}
</entry>{{ end }}
</feed>