From 577788e5fbbeea87c813bcf63c9c3952bdc4ed1d Mon Sep 17 00:00:00 2001 From: srgg Date: Tue, 7 Apr 2026 13:49:00 -0600 Subject: [PATCH] fix(rss): RSS feed respects sitemap-disabled pages --- modules/blox/layouts/rss.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/blox/layouts/rss.xml b/modules/blox/layouts/rss.xml index bb6366257..28ad0110f 100644 --- a/modules/blox/layouts/rss.xml +++ b/modules/blox/layouts/rss.xml @@ -2,6 +2,7 @@ {{- /* Upstream Hugo bug - RSS dates can be in future: https://github.com/gohugoio/hugo/issues/3918 */ -}} {{- $page_context := cond .IsHome site . -}} {{- $pages := $page_context.RegularPages -}} +{{- $pages = where $pages "Params.sitemap.disable" "!=" true -}} {{- $limit := site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} @@ -16,7 +17,7 @@ {{ end -}} {{ .Title | default site.Title }} HugoBlox Kit (https://hugoblox.com) - {{- with site.Language.Locale }}{{.}}{{end -}} + {{- with site.LanguageCode }}{{.}}{{end -}} {{- with site.Copyright }}{{ strings.ReplacePairs . "{year}" now.Year "©" "©" | plainify }}{{end -}} {{- if not .Date.IsZero }}{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end -}} {{- if .Scratch.Get "og_image" }}