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>
This commit is contained in:
Joe Mooring
2024-04-01 15:30:03 -07:00
committed by Bjørn Erik Pedersen
parent 2f7df4b926
commit 6738a3e79d
6 changed files with 62 additions and 8 deletions

View File

@@ -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) {