{{- $authorEmail := "" -}} {{- $authorName := "" -}} {{- $favicon := "favicon.png" | absURL -}} {{- with site.Params.author -}} {{- if reflect.IsMap . -}} {{- with .email }}{{- $authorEmail = . -}}{{- end -}} {{- with .name }}{{- $authorName = . -}}{{- end -}} {{- else -}} {{- $authorName = . -}} {{- end -}} {{- end -}} {{- $pctx := . -}} {{- if .IsHome -}}{{- $pctx = .Site -}}{{- end -}} {{- $pages := slice -}} {{- if or .IsHome .IsSection -}} {{- $pages = $pctx.RegularPages -}} {{- else -}} {{- $pages = $pctx.Pages -}} {{- end -}} {{- $pages = $pages.ByLastmod.Reverse -}} {{- $limit := .Site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = first $limit $pages -}} {{- end -}} {{- printf "" | safeHTML -}} {{ .Site.Title }} {{ .Permalink }} {{ .Site.Title }} {{ $favicon }} {{ .Site.Title }} {{ .Permalink }} {{ site.Language.LanguageCode }}{{ with $authorEmail }} {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} {{ . }}{{ end }}{{ if not .Date.IsZero }} {{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" }} {{ printf "" .Permalink .MediaType | safeHTML }} {{- end }} {{- range $pages }} {{ .Title }} {{ .Permalink }} {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} {{ .Permalink }} {{ .Summary | transform.XMLEscape | safeHTML }} {{- end }}