{{- $pctx := . -}} {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} {{- $pages := slice -}} {{- if $.IsHome -}} {{- $mainSections := site.Params.mainSections | default (slice "post") }} {{- $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 -}} {{- safeHTML "" }} {{ printf `<![CDATA[%s]]>` (partial "title.html" .) | safeHTML }} {{ site.BaseURL | absURL }} {{ $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png") }}{{ $logo = $logo.Resize "96x96" }} {{ $logo.Permalink | absURL }} {{ printf `<![CDATA[%s]]>` (partial "title.html" .) | safeHTML }} {{ site.BaseURL | absURL }} {{ $logo.Width }} {{ $logo.Height }} {{- $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 }} {{ with site.Params.description }}{{ printf `` . | safeHTML }}{{ end }} Hugo {{ hugo.Version }}{{ with site.Author.name }} {{ printf `` . | safeHTML }}{{ end }}{{ with site.LanguageCode }} {{ . }}{{ end }}{{ with site.Params.Copyright }}{{ $copyright := replace . "{year}" now.Year }}{{ $copyright = replace $copyright "©" "©" }} {{ $copyright | plainify }}{{ end }}{{ if not site.LastChange.IsZero }} {{ site.LastChange.UTC.Format site.Params.dateFormatRFC822Z | html }}{{ end }}{{- range $pages }} {{ printf `<![CDATA[%s]]>` .Title | safeHTML }} {{ .Permalink | absURL }}?utm_source=rss_feed {{ .PublishDate.UTC.Format site.Params.dateFormatRFC822Z | html }} {{ .Section }}{{ range (.GetTerms "tags") }} {{ .LinkTitle }}{{end}} {{ md5 .Permalink }} {{ printf `` .Summary | safeHTML }} {{ end }}