2020-06-01 15:56:45 +02:00
|
|
|
{{- $pctx := . -}}
|
|
|
|
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
|
|
|
{{- $pages := slice -}}
|
|
|
|
{{- if or $.IsHome $.IsSection -}}
|
|
|
|
{{- $pages = $pctx.RegularPages -}}
|
|
|
|
{{- else -}}
|
|
|
|
{{- $pages = $pctx.Pages -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
|
|
|
{{- if ge $limit 1 -}}
|
|
|
|
{{- $pages = $pages | first $limit -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
2019-08-11 09:09:30 +02:00
|
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
|
|
<channel>
|
|
|
|
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
|
|
|
<link>{{ .Permalink }}</link>
|
|
|
|
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
|
|
|
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
2024-08-26 08:25:16 +02:00
|
|
|
<language>{{.}}</language>{{end}}{{ with .Site.Params.author.email }}
|
|
|
|
<managingEditor>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
|
|
|
<webMaster>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
2019-08-11 09:09:30 +02:00
|
|
|
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
|
|
|
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
|
|
|
{{ with .OutputFormats.Get "RSS" }}
|
2020-06-01 15:56:45 +02:00
|
|
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
2019-08-11 09:09:30 +02:00
|
|
|
{{ end }}
|
2020-06-01 15:56:45 +02:00
|
|
|
{{ range $pages }}
|
2019-08-11 09:09:30 +02:00
|
|
|
<item>
|
|
|
|
<title>{{ .Title }}</title>
|
|
|
|
<link>{{ .Permalink }}</link>
|
2024-08-26 08:39:50 +02:00
|
|
|
{{ if (and (isset .Params "lastmod") (gt (dateFormat "2006-01-02" (.Lastmod)) (dateFormat "2006-01-02" (.PublishDate)))) }}
|
|
|
|
<pubDate>{{ .Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
|
|
|
{{ else }}
|
2022-01-02 20:24:06 +01:00
|
|
|
<pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
2024-08-26 08:39:50 +02:00
|
|
|
{{ end }}
|
2024-08-26 08:25:16 +02:00
|
|
|
{{ with .Site.Params.author.email }}<author>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</author>{{end}}
|
2019-08-11 09:09:30 +02:00
|
|
|
<guid>{{ .Permalink }}</guid>
|
|
|
|
<description>{{ .Content | html }}</description>
|
|
|
|
</item>
|
|
|
|
{{ end }}
|
|
|
|
</channel>
|
|
|
|
</rss>
|