tpl: Adjust the RSS taxonomy logic

See #6909
This commit is contained in:
Bjørn Erik Pedersen 2020-02-18 17:29:46 +01:00
parent aa3e183056
commit d73e37387c
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
2 changed files with 6 additions and 6 deletions

View file

@ -22,10 +22,10 @@ var EmbeddedTemplates = [][2]string{
{`_default/rss.xml`, `{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if eq $.Kind "taxonomyTerm" -}}
{{- $pages = $pctx.Pages -}}
{{- else -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}

View file

@ -1,10 +1,10 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if eq $.Kind "taxonomyTerm" -}}
{{- $pages = $pctx.Pages -}}
{{- else -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}