{{- $authorEmail := "" }} {{- with site.Params.author }} {{- if reflect.IsMap . }} {{- with .email }} {{- $authorEmail = . }} {{- end }} {{- end }} {{- end }} {{- $authorName := "" }} {{- with site.Params.author }} {{- if reflect.IsMap . }} {{- 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 }} {{- $limit := .Site.Config.Services.RSS.Limit }} {{- if ge $limit 1 }} {{- $pages = $pages | first $limit }} {{- end }} {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }} {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }} {{ .Permalink }} {{ with $authorName }}{{ . }}{{ end }} {{ with $authorEmail }}{{ . }}{{ end }} Hugo {{- range $pages }} {{ .Title }} {{ .Permalink }} {{ with $authorName }}{{ . }}{{ end }} {{ with $authorEmail }}{{ . }}{{ end }} {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }} {{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }} {{ .Content | transform.XMLEscape | safeHTML }} {{- end }}