diff options
author | Joe Mooring <[email protected]> | 2024-04-01 15:30:03 -0700 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-04-02 11:21:03 +0200 |
commit | 6738a3e79dd545603d9851832bc3140fd184bfef (patch) | |
tree | 9faff4e6a3fed40c8c9f59df19fd296c48ad49ef /config | |
parent | 2f7df4b926fe20849e9030edfe9b1d94b8cadfa9 (diff) | |
download | hugo-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.go | 2 |
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) { |