Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tpl
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-17 18:11:41 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-17 19:50:16 +0300
commit564cf1bb11e100891992e9131b271a79ea7fc528 (patch)
tree7980e931ca589b949959bd444951e4b969499e59 /tpl
parent4b4bdcfe740d988e4cfb4fee53eced6985576abd (diff)
tpl: Avoid "home page warning" in RSS template
See #6238
Diffstat (limited to 'tpl')
-rw-r--r--tpl/tplimpl/embedded/templates.autogen.go4
-rw-r--r--tpl/tplimpl/embedded/templates/_default/rss.xml4
2 files changed, 4 insertions, 4 deletions
diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go
index 93713f00c..a38ab29fa 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 a3f58010e..b5050015f 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 -}}