Raw
 1{{- $pages := .RegularPages -}}
 2{{- if .IsHome -}}{{- $pages = site.RegularPages -}}{{- end -}}
 3{{- if eq .Kind "taxonomy" -}}{{- $pages = .Pages -}}{{- end -}}
 4{{- $limit := site.Config.Services.RSS.Limit -}}
 5{{- if ge $limit 1 -}}{{- $pages = first $limit $pages -}}{{- end -}}
 6{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
 7<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 8  <channel>
 9    <title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }} on {{ site.Title }}{{ end }}</title>
10    <link>{{ .Permalink }}</link>
11    <description>Recent content{{ if not .IsHome }} in {{ .Title }}{{ end }} on {{ site.Title }}</description>
12    <generator>Hugo</generator>
13    <language>{{ site.Language.Locale }}</language>
14    {{ with site.Copyright }}<copyright>{{ . }}</copyright>{{ end }}
15    {{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
16    {{ with .OutputFormats.Get "RSS" }}<atom:link href="{{ .Permalink }}" rel="self" type="application/rss+xml" />{{ end }}
17    {{ range $pages }}
18    <item>
19      <title>{{ .Title }}</title>
20      <link>{{ .Permalink }}</link>
21      {{ if not .Date.IsZero }}<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>{{ end }}
22      <guid>{{ .Permalink }}</guid>
23      <description>{{ partial "content-html.html" .Summary | transform.XMLEscape | safeHTML }}</description>
24    </item>
25    {{ end }}
26  </channel>
27</rss>