-{{- $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 }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>{{ site.Title }}</title>
<link>{{ .Permalink }}</link>
- <description>{{ site.Description }}</description>
+ <description>{{ site.Params.description }}</description>
<generator>Hugo -- {{ hugo.Version }}</generator>
<language>{{ site.Language.LanguageCode }}</language>
- <managingEditor>{{params.author.email}} ({{params.author.name}})</managingEditor>
- <webMaster>{{params.author.email}} ({{params.author.name}})</webMaster>
- <copyright>{{ . | markdownify | plainify | strings.TrimPrefix "© " }}</copyright>
- <lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.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`) }}
+ <managingEditor>{{site.Params.author.email}} ({{site.Params.author.name}})</managingEditor>
+ <webMaster>{{site.Params.author.email}} ({{site.Params.author.name}})</webMaster>
+ <copyright>{{ site.Copyright | markdownify | plainify | strings.TrimPrefix "© " }}</copyright>
+ <lastBuildDate>{{ site.Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
+ <atom:link href="{{ .Permalink }}" rel="self" type="rss" />
+ {{- range .RegularPagesRecursive }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
- {{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
+ <author>{{site.Params.author.email}} ({{site.Params.author.name}})</author>
<guid>{{ .Permalink }}</guid>
- <description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
- {{- if and site.Params.ShowFullTextinRSS .Content }}
- <content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded>
- {{- end }}
+ {{ with .Description }}
+ <description>{{ . }}</description>
+ {{ end -}}
</item>
{{- end }}
- {{- end }}
</channel>
</rss>