{{- $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 "" | safeHTML }} {{ .Site.Title }} {{ .Permalink }} Recent content on {{ .Site.Title }} Hugo {{ hugo.Version }} -- gohugo.io {{ with .Site.LanguageCode }}{{ . }}{{ end }} {{ with .Site.Author }}{{ .name }} <{{ .email }}>{{ end }} {{ with .Site.Author.email }}{{ .name }} <{{ .email }}>{{ end }} {{ with .Site.Copyright }}{{ . }}{{ end }} {{ if not .Date.IsZero }}{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{ with .OutputFormats.Get "RSS" }}{{ printf "" .Permalink .MediaType | safeHTML }}{{ end }} {{ range $pages }}{{ .Render "rss_item" }}{{ end }}