{{- $pctx := . -}} {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} {{- $pages := slice -}} {{- if $.IsHome -}} {{- $mainSections := site.Params.mainSections | default (slice "posts") }} {{- $pages = where $pctx.RegularPages.ByDate.Reverse "Type" "in" $mainSections -}} {{- else if $.IsSection -}} {{- $pages = $pctx.RegularPages.ByDate.Reverse -}} {{- else -}} {{- $pages = $pctx.Pages -}} {{- end -}} {{- $limit := site.Params.feedSize | default 25 -}} {{- $pages = $pages | first $limit -}} {{- $siteLastMod := partial "site-last-mod.html" . -}} {{- $siteAuthor := partial "site-author.html" . -}} {{- printf "" | safeHTML }} {{ partial "title.html" . }} {{ .Permalink }} {{ partial "description.html" . }} Hugo {{ hugo.Version }} {{ site.Language.LanguageCode }}{{ with site.Params.Copyright -}} {{ $copyright := replace . "{year}" now.Year }}{{ $copyright = replace $copyright "©" "©" }} {{ $copyright | plainify }}{{ end }} {{ $siteLastMod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{- $output_formats := .OutputFormats }} {{- range $output_formats -}} {{- $rel := (or (and (eq "feed" (.Name | lower)) "self") "alternate") -}} {{- with $output_formats.Get .Name }} {{ printf `` .RelPermalink $rel .MediaType.Type .Name | safeHTML }} {{- end -}} {{- end }} {{- range $pages }} {{ .Title }} {{ .Permalink | absURL }}?utm_source=rss_feed {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with $siteAuthor.email }}{{ . }}{{ with $siteAuthor.name }} ({{ . }}){{ end }}{{ end }} {{ .Section }}{{ range (.GetTerms "tags") }} {{ .LinkTitle }}{{ end }} {{ md5 .Permalink }} {{ .Summary | transform.XMLEscape | safeHTML }} {{ end }}