diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 3b28fbf6..b6a7ec06 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -31,23 +31,23 @@ {{- end }} {{- $pctx := . }} -{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} +{{- 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 }} +{{- $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 }} + {{ 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 }} + Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }} {{- with site.Params.images }} {{ site.Title }} @@ -58,7 +58,7 @@ Hugo -- gohugo.io {{ site.Language.LanguageCode }}{{ with $authorEmail }} {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} - {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} + {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with site.Copyright }} {{ . }}{{ end }}{{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" }} @@ -78,6 +78,6 @@ {{- end }} {{- end }} - {{ end }} + {{- end }}