From 6738a3e79dd545603d9851832bc3140fd184bfef Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Mon, 1 Apr 2024 15:30:03 -0700 Subject: tpl/tplimpl: Optionally exclude content from sitemap Define global inclusion/exclusion in site configuration, and override via front matter. For example, to exclude a page from the sitemap: [sitemap] disable = true # default is false Closes #653 Closes #12282 Co-authored-by: kolappannathan Co-authored-by: felicianotech --- config/commonConfig.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/commonConfig.go b/config/commonConfig.go index 6ca061093..6ae97c2a1 100644 --- a/config/commonConfig.go +++ b/config/commonConfig.go @@ -215,6 +215,8 @@ type SitemapConfig struct { Priority float64 // The sitemap filename. Filename string + // Whether to disable page inclusion. + Disable bool } func DecodeSitemap(prototype SitemapConfig, input map[string]any) (SitemapConfig, error) { -- cgit v1.2.3