mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
d74452cfe8
commit
69d92dc49c
2 changed files with 12 additions and 0 deletions
|
@ -59,6 +59,7 @@ func LoadConfig(fs afero.Fs, relativeSourcePath, configFilename string) (*viper.
|
|||
}
|
||||
|
||||
if v.IsSet("disableSitemap") {
|
||||
// NOTE: Do not remove this until Hugo 0.24, ERROR in 0.23.
|
||||
helpers.Deprecated("site config", "disableSitemap", "Use disableKinds= [\"sitemap\"]", false)
|
||||
}
|
||||
|
||||
|
|
|
@ -269,6 +269,17 @@ func (h *HugoSites) renderCrossSitesArtifacts() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
sitemapEnabled := false
|
||||
for _, s := range h.Sites {
|
||||
if s.isEnabled(kindSitemap) {
|
||||
sitemapEnabled = true
|
||||
}
|
||||
}
|
||||
|
||||
if !sitemapEnabled {
|
||||
return nil
|
||||
}
|
||||
|
||||
// TODO(bep) DRY
|
||||
sitemapDefault := parseSitemap(h.Cfg.GetStringMap("sitemap"))
|
||||
|
||||
|
|
Loading…
Reference in a new issue