From c4e3a6054cebceb7dc9c97014e2bddb64fd8c5a9 Mon Sep 17 00:00:00 2001 From: srgg Date: Tue, 7 Apr 2026 13:11:36 -0600 Subject: [PATCH] fix(404): exclude sitemap-disabled pages from 404 suggestions Previously, pages with sitemap.disable=true were shown in 404 suggestions. This change filters them out for consistency and better UX. --- modules/blox/layouts/404.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/blox/layouts/404.html b/modules/blox/layouts/404.html index bbacc5a81..0c02a418e 100644 --- a/modules/blox/layouts/404.html +++ b/modules/blox/layouts/404.html @@ -8,7 +8,7 @@

{{ i18n "page_not_found" }}

{{ i18n "404_recommendations" }}

- {{ $query := where (where (where (where site.Pages.ByDate.Reverse "Title" "!=" "") "Kind" "in" (slice "page" "section")) "Params.private" "!=" true) "Permalink" "!=" "" }} + {{ $query := where (where (where (where (where site.Pages.ByDate.Reverse "Title" "!=" "") "Kind" "in" (slice "page" "section")) "Params.private" "!=" true) "Params.sitemap.disable" "!=" true) "Permalink" "!=" "" }} {{ $count := len $query }} {{ if gt $count 0 }}

{{ i18n "user_profile_latest" }}