From: Bjørn Erik Pedersen Date: Sat, 17 Aug 2019 15:11:41 +0000 (+0200) Subject: tpl: Avoid "home page warning" in RSS template X-Git-Tag: v0.57.2~6 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=564cf1bb11e100891992e9131b271a79ea7fc528;p=brevno-suite%2Fhugo tpl: Avoid "home page warning" in RSS template See #6238 --- diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go index 93713f00..a38ab29f 100644 --- a/tpl/tplimpl/embedded/templates.autogen.go +++ b/tpl/tplimpl/embedded/templates.autogen.go @@ -19,8 +19,8 @@ package embedded // EmbeddedTemplates represents all embedded templates. var EmbeddedTemplates = [][2]string{ {`_default/robots.txt`, `User-agent: *`}, - {`_default/rss.xml`, `{{- $pages := .Pages -}} -{{- if .IsHome -}}{{- $pages = .Site.RegularPages -}}{{- end -}} + {`_default/rss.xml`, `{{- $pages := "" -}} +{{- if .IsHome -}}{{- $pages = .Site.RegularPages -}}{{- else -}}{{- $pages = .Pages -}}{{- end -}} {{- $limit := .Site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} diff --git a/tpl/tplimpl/embedded/templates/_default/rss.xml b/tpl/tplimpl/embedded/templates/_default/rss.xml index a3f58010..b5050015 100644 --- a/tpl/tplimpl/embedded/templates/_default/rss.xml +++ b/tpl/tplimpl/embedded/templates/_default/rss.xml @@ -1,5 +1,5 @@ -{{- $pages := .Pages -}} -{{- if .IsHome -}}{{- $pages = .Site.RegularPages -}}{{- end -}} +{{- $pages := "" -}} +{{- if .IsHome -}}{{- $pages = .Site.RegularPages -}}{{- else -}}{{- $pages = .Pages -}}{{- end -}} {{- $limit := .Site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}}