tpl: Fix RSS template for the terms listing

Fixes #6909
This commit is contained in:
Bjørn Erik Pedersen
2020-02-18 16:55:30 +01:00
parent 1b7acfe763
commit aa3e183056
3 changed files with 13 additions and 3 deletions

View File

@@ -21,7 +21,12 @@ var EmbeddedTemplates = [][2]string{
{`_default/robots.txt`, `User-agent: *`},
{`_default/rss.xml`, `{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := $pctx.RegularPages -}}
{{- $pages := slice -}}
{{- if eq $.Kind "taxonomyTerm" -}}
{{- $pages = $pctx.Pages -}}
{{- else -}}
{{- $pages = $pctx.RegularPages -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}

View File

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