summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorJoe Mooring <joe.mooring@veriphor.com>2024-04-01 15:30:03 -0700
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2024-04-02 11:21:03 +0200
commit6738a3e79dd545603d9851832bc3140fd184bfef (patch)
tree9faff4e6a3fed40c8c9f59df19fd296c48ad49ef /config
parent2f7df4b926fe20849e9030edfe9b1d94b8cadfa9 (diff)
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 <kolappannathan@users.noreply.github.com> Co-authored-by: felicianotech <FelicianoTech@gmail.com>
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) {