add feed to spam “category”

main
Dominic Reich 1 year ago
parent e78245283c
commit ad43b61b56
Signed by: dominic
GPG Key ID: BC9D6AE1A3BE169A

@ -13,7 +13,7 @@ date = '2023-07-29T17:01:28+02:00'
# showWordCount = false # showWordCount = false
# showPagination = false # showPagination = false
feed_exclude = true #feed_exclude = true
#site_exclude = true #site_exclude = true
+++ +++

@ -0,0 +1,39 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := $pctx.RegularPages -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<feed xmlns=\"http://www.w3.org/2005/Atom\">" | safeHTML }}
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link rel="self" href="{{ .Permalink }}"/>
<updated>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
<author>
<name>Dominic Reich “OE7DRT”</name>
<email>dominic@noreply.oe7drt.com</email>
<uri>https://oe7drt.com</uri>
</author>
<id>{{ .Permalink }}</id>
{{ range $pages }}{{ if ne .Params.feed_exclude true }}
<entry>
<title>{{ .Title }}</title>
<author>
<name>Dominic Reich “OE7DRT”</name>
<email>dominic@noreply.oe7drt.com</email>
<uri>https://oe7drt.com</uri>
</author>
<link rel="alternate" href="{{ .Permalink }}"/>
<id>{{ .Permalink }}</id>
<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 .Site.Params.rssFullContent }}
<summary type="html">{{ .Summary | html }}</summary>
<content type="html">{{ .Content | html }}</content>
{{ else }}
<summary type="html">{{ .Summary | html }}</summary>
{{ end }}
</entry>
{{ end }}{{ end }}
</feed>
Loading…
Cancel
Save