summaryrefslogtreecommitdiffstats
path: root/hugolib/config.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-05-10 20:00:08 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-05-10 20:00:08 +0200
commit5794a265b41ffdeebfd8485eecf65cf4088d49d6 (patch)
tree28e294d8b0eb818fcdf132c31ce350d00070250f /hugolib/config.go
parentebf677a58360126d8b9a1e98d086aa4279f53181 (diff)
commands, hugolib: Deprecate disable404, disableRSS, disableSitemap, disableRobotsTXT
Use disableKinds instead. Fixes #3345
Diffstat (limited to 'hugolib/config.go')
-rw-r--r--hugolib/config.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/hugolib/config.go b/hugolib/config.go
index 50e742bc2..8847b3495 100644
--- a/hugolib/config.go
+++ b/hugolib/config.go
@@ -49,6 +49,23 @@ func LoadConfig(fs afero.Fs, relativeSourcePath, configFilename string) (*viper.
v.RegisterAlias("indexes", "taxonomies")
+ // Remove these in Hugo 0.23.
+ if v.IsSet("disable404") {
+ helpers.Deprecated("site config", "disable404", "Use disableKinds=[\"404\"]", false)
+ }
+
+ if v.IsSet("disableRSS") {
+ helpers.Deprecated("site config", "disableRSS", "Use disableKinds=[\"RSS\"]", false)
+ }
+
+ if v.IsSet("disableSitemap") {
+ helpers.Deprecated("site config", "disableSitemap", "Use disableKinds= [\"sitemap\"]", false)
+ }
+
+ if v.IsSet("disableRobotsTXT") {
+ helpers.Deprecated("site config", "disableRobotsTXT", "Use disableKinds= [\"robotsTXT\"]", false)
+ }
+
loadDefaultSettingsFor(v)
return v, nil