From aa3e1830568cabaa8bf3277feeba6cb48746e40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 18 Feb 2020 16:55:30 +0100 Subject: tpl: Fix RSS template for the terms listing Fixes #6909 --- tpl/tplimpl/embedded/templates.autogen.go | 7 ++++++- tpl/tplimpl/embedded/templates/_default/rss.xml | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'tpl') diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go index f64f18ee1..c9dec8988 100644 --- a/tpl/tplimpl/embedded/templates.autogen.go +++ b/tpl/tplimpl/embedded/templates.autogen.go @@ -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 -}} diff --git a/tpl/tplimpl/embedded/templates/_default/rss.xml b/tpl/tplimpl/embedded/templates/_default/rss.xml index 3e17f48c6..5ec2025b6 100644 --- a/tpl/tplimpl/embedded/templates/_default/rss.xml +++ b/tpl/tplimpl/embedded/templates/_default/rss.xml @@ -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 -}} -- cgit v1.2.3