aboutsummaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
authorJoe Mooring <[email protected]>2024-04-01 15:30:03 -0700
committerBjørn Erik Pedersen <[email protected]>2024-04-02 11:21:03 +0200
commit6738a3e79dd545603d9851832bc3140fd184bfef (patch)
tree9faff4e6a3fed40c8c9f59df19fd296c48ad49ef /config
parent2f7df4b926fe20849e9030edfe9b1d94b8cadfa9 (diff)
downloadhugo-6738a3e79dd545603d9851832bc3140fd184bfef.tar.gz
hugo-6738a3e79dd545603d9851832bc3140fd184bfef.zip
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 <[email protected]> Co-authored-by: felicianotech <[email protected]>
Diffstat (limited to 'config')
-rw-r--r--config/commonConfig.go2
1 files changed, 2 insertions, 0 deletions
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) {