shithub: hugo

Download patch

ref: 88d69936122f82fffc02850516bdb37be3d0892b
parent: ea6816030081b2cffa6c0ae9ca5429a2c6fe2fa5
author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
date: Sat Aug 17 15:37:14 EDT 2019

tpl: Use RegularPages for RSS template

This is in line with how it was in Hugo 0.56.

See #6238

--- a/tpl/tplimpl/embedded/templates.autogen.go
+++ b/tpl/tplimpl/embedded/templates.autogen.go
@@ -19,8 +19,9 @@
 // EmbeddedTemplates represents all embedded templates.
 var EmbeddedTemplates = [][2]string{
 	{`_default/robots.txt`, `User-agent: *`},
-	{`_default/rss.xml`, `{{- $pages := "" -}}
-{{- if .IsHome -}}{{- $pages = .Site.RegularPages -}}{{- else -}}{{- $pages = .Pages -}}{{- end -}}
+	{`_default/rss.xml`, `{{- $pctx := . -}}
+{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
+{{- $pages := $pctx.RegularPages -}}
 {{- $limit := .Site.Config.Services.RSS.Limit -}}
 {{- if ge $limit 1 -}}
 {{- $pages = $pages | first $limit -}}
--- a/tpl/tplimpl/embedded/templates/_default/rss.xml
+++ b/tpl/tplimpl/embedded/templates/_default/rss.xml
@@ -1,5 +1,6 @@
-{{- $pages := "" -}}
-{{- if .IsHome -}}{{- $pages = .Site.RegularPages -}}{{- else -}}{{- $pages = .Pages -}}{{- end -}}
+{{- $pctx := . -}}
+{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
+{{- $pages := $pctx.RegularPages -}}
 {{- $limit := .Site.Config.Services.RSS.Limit -}}
 {{- if ge $limit 1 -}}
 {{- $pages = $pages | first $limit -}}