2021-03-25 09:20:53 +00:00
|
|
|
{{- $pctx := . -}}
|
2022-03-27 14:14:06 +01:00
|
|
|
{{- if .IsHome -}}{{ $pctx = site }}{{- end -}}
|
2021-03-25 09:20:53 +00:00
|
|
|
{{- $pages := slice -}}
|
|
|
|
{{- if or $.IsHome $.IsSection -}}
|
|
|
|
{{- $pages = $pctx.RegularPages -}}
|
|
|
|
{{- else -}}
|
|
|
|
{{- $pages = $pctx.Pages -}}
|
|
|
|
{{- end -}}
|
2022-03-27 14:14:06 +01:00
|
|
|
{{- $limit := site.Config.Services.RSS.Limit -}}
|
2021-03-25 09:20:53 +00:00
|
|
|
{{- if ge $limit 1 -}}
|
|
|
|
{{- $pages = $pages | first $limit -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
2021-05-02 06:59:31 +01:00
|
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
|
2021-03-25 09:20:53 +00:00
|
|
|
<channel>
|
2022-03-27 14:14:06 +01:00
|
|
|
<title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ site.Title }}{{ end }}</title>
|
2021-03-25 09:20:53 +00:00
|
|
|
<link>{{ .Permalink }}</link>
|
2022-03-27 14:14:06 +01:00
|
|
|
<description>Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ site.Title }}</description>
|
|
|
|
{{- with site.Params.images }}
|
2021-03-25 09:20:53 +00:00
|
|
|
<image>
|
|
|
|
<url>{{ index . 0 | absURL }}</url>
|
|
|
|
<link>{{ index . 0 | absURL }}</link>
|
|
|
|
</image>
|
|
|
|
{{- end }}
|
2022-03-27 14:14:06 +01:00
|
|
|
<generator>Hugo -- gohugo.io</generator>{{ with site.LanguageCode }}
|
|
|
|
<language>{{.}}</language>{{end}}{{ with site.Author.email }}
|
|
|
|
<managingEditor>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with site.Author.email }}
|
|
|
|
<webMaster>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with site.Copyright }}
|
2021-03-25 09:20:53 +00: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" -}}
|
|
|
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
|
|
|
{{- end -}}
|
|
|
|
{{ range $pages }}
|
|
|
|
{{- if and (ne .Layout `search`) (ne .Layout `archives`) }}
|
|
|
|
<item>
|
|
|
|
<title>{{ .Title }}</title>
|
|
|
|
<link>{{ .Permalink }}</link>
|
|
|
|
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
2022-03-27 14:14:06 +01:00
|
|
|
{{ with site.Author.email }}<author>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
2021-03-25 09:20:53 +00:00
|
|
|
<guid>{{ .Permalink }}</guid>
|
|
|
|
<description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
|
2022-03-27 14:14:06 +01:00
|
|
|
{{- if site.Params.ShowFullTextinRSS }}
|
2021-05-02 06:59:31 +01:00
|
|
|
<content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded>
|
2021-04-29 15:07:50 +01:00
|
|
|
{{- end }}
|
2021-03-25 09:20:53 +00:00
|
|
|
</item>
|
|
|
|
{{- end }}
|
|
|
|
{{ end }}
|
|
|
|
</channel>
|
|
|
|
</rss>
|