{{- $pctx := . -}} {{- if .IsHome -}}{{ $pctx = site }}{{- end -}} {{- $pages := where (where $pctx.RegularPages ".Params.disable_feed" "!=" true) "Params.private" "!=" true -}} {{- $limit := site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} {{- end -}} {{- printf "" | safeHTML }} {{ with .Site.Params.feedTitle }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }} {{ .Site.BaseURL }} Recent blog posts on {{ .Site.Title }} {{ with .Site.Params.copyright }} {{ . }}{{ end }} Hugo (https://gohugo.io) {{ with .Site.Language.Locale }} {{.}}{{end}} {{ with .Site.Params.author.name }} {{ with $.Site.Params.author.email }}{{ . }}{{ with $.Site.Params.author.name }} ({{ . }}){{ end }}{{ end }}{{ end }} {{ with .Site.Params.author.name }} {{ with $.Site.Params.author.email }}{{ . }}{{ with $.Site.Params.author.name }} ({{ . }}){{ end }}{{ end }}{{ end }} {{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 Z0700" | safeHTML }}{{ end }} {{ with .OutputFormats.Get "RSS" }} {{ printf "" .Permalink .MediaType | safeHTML }}{{ end }} {{ range $index, $page := $pages }} {{ .Title }} {{ .Permalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 Z0700" | safeHTML }} {{ with .Site.Params.author.name }} {{ with $.Site.Params.author.email }}{{ . }}{{ with $.Site.Params.author.name }} ({{ . }}){{ end }}{{ end }}{{ end }} {{ $cover := "" }} {{ with $page.Params.cover }} {{ $res := $page.Resources.GetMatch . }} {{ if $res }} {{ $cover = $res.Permalink }} {{ else }} {{ $cover = . | absURL }} {{ end }} {{ end }} {{ if $cover }} Cover Image {{ end }} {{ .Summary | plainify | htmlEscape }} {{ .Permalink }} {{ end }}