feat(atom): try to improve atom feed

This commit is contained in:
valvin 2022-11-24 22:08:01 +01:00
parent c654c96fcf
commit 5163a3d7a2
1 changed files with 7 additions and 0 deletions

View File

@ -3,12 +3,19 @@
<id>{{ .URL }}</id> <id>{{ .URL }}</id>
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<updated>{{ site.Generated.Format "2006-01-02T15:04:05Z07:00" }}</updated> <updated>{{ site.Generated.Format "2006-01-02T15:04:05Z07:00" }}</updated>
<author>
<name>Valvin</name>
</author>
<link href="{{ .URL | safeURL }}" rel="alternate"/> <link href="{{ .URL | safeURL }}" rel="alternate"/>
<link href="{{ .URL | safeURL }}/atom.xml" rel="self"/>
{{ range .Pages }}<entry> {{ range .Pages }}<entry>
<link href="{{ .URL | safeURL }}" rel="alternate"/> <link href="{{ .URL | safeURL }}" rel="alternate"/>
<id>{{ .URL }}</id> <id>{{ .URL }}</id>
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<updated>{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}</updated> <updated>{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}</updated>
{{ if .Params.tags }}{{ range strings.Split .Params.tags "," -}}
<category term="{{ strings.ReplaceAll . " " "" }}" />
{{ end }}{{ end -}}
</entry> </entry>
{{ end -}} {{ end -}}
</feed> </feed>