mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
tpl: Use RegularPages for RSS template
This is in line with how it was in Hugo 0.56. See #6238
This commit is contained in:
5
tpl/tplimpl/embedded/templates.autogen.go
generated
5
tpl/tplimpl/embedded/templates.autogen.go
generated
@@ -19,8 +19,9 @@ package embedded
|
|||||||
// EmbeddedTemplates represents all embedded templates.
|
// EmbeddedTemplates represents all embedded templates.
|
||||||
var EmbeddedTemplates = [][2]string{
|
var EmbeddedTemplates = [][2]string{
|
||||||
{`_default/robots.txt`, `User-agent: *`},
|
{`_default/robots.txt`, `User-agent: *`},
|
||||||
{`_default/rss.xml`, `{{- $pages := "" -}}
|
{`_default/rss.xml`, `{{- $pctx := . -}}
|
||||||
{{- if .IsHome -}}{{- $pages = .Site.RegularPages -}}{{- else -}}{{- $pages = .Pages -}}{{- end -}}
|
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||||
|
{{- $pages := $pctx.RegularPages -}}
|
||||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||||
{{- if ge $limit 1 -}}
|
{{- if ge $limit 1 -}}
|
||||||
{{- $pages = $pages | first $limit -}}
|
{{- $pages = $pages | first $limit -}}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
{{- $pages := "" -}}
|
{{- $pctx := . -}}
|
||||||
{{- if .IsHome -}}{{- $pages = .Site.RegularPages -}}{{- else -}}{{- $pages = .Pages -}}{{- end -}}
|
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||||
|
{{- $pages := $pctx.RegularPages -}}
|
||||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||||
{{- if ge $limit 1 -}}
|
{{- if ge $limit 1 -}}
|
||||||
{{- $pages = $pages | first $limit -}}
|
{{- $pages = $pages | first $limit -}}
|
||||||
|
Reference in New Issue
Block a user