{{- $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 }} {{- $pages = where $pages "Params.hiddenInRss" "!=" true }} {{- $pages = $pages.ByPublishDate.Reverse }} {{- $limit := site.Config.Services.RSS.Limit }} {{- if ge $limit 1 }} {{- $pages = $pages | first $limit }} {{- end }} {{- printf "" | safeHTML }} {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }} {{ .Permalink }} Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }} {{- with site.Params.images }} {{ site.Title }} {{ index . 0 | absURL }} {{ index . 0 | absURL }} {{- end }} Hugo {{ site.Language.LanguageCode }}{{ with $authorEmail }} {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with site.Copyright }} {{ . | markdownify | plainify | strings.TrimPrefix "© " }}{{ 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 }} {{- if and (ne .Layout `search`) (ne .Layout `archives`) }} {{- $isThought := eq .Type "thoughts" }} {{- $thoughtText := "" }} {{- if $isThought }}{{ $thoughtText = partial "thought_text.html" . }}{{ end }} {{- $link := .Permalink }} {{- if $isThought }}{{ $link = printf "%s#%s" ("thoughts/" | absLangURL) (partial "thought_anchor.html" .) }}{{ end }} {{ if $isThought }}{{ $thoughtText }}{{ else }}{{ .Title }}{{ end }} {{ $link }} {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} {{ $link }} {{ if $isThought }}{{ $thoughtText | html }}{{ else }}{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end }}{{ end }} {{- if and site.Params.ShowFullTextinRSS .Content }} {{ if $isThought }}{{ (printf "" $thoughtText) | safeHTML }}{{ else }}{{ (printf "" .Content) | safeHTML }}{{ end }} {{- end }} {{- end }} {{- end }}