summaryrefslogtreecommitdiffstats
path: root/commands/hugo.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 /commands/hugo.go
parentebf677a58360126d8b9a1e98d086aa4279f53181 (diff)
commands, hugolib: Deprecate disable404, disableRSS, disableSitemap, disableRobotsTXT
Use disableKinds instead. Fixes #3345
Diffstat (limited to 'commands/hugo.go')
-rw-r--r--commands/hugo.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/commands/hugo.go b/commands/hugo.go
index 4c12ccc7d..b7bc863a4 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -467,6 +467,19 @@ func (c *commandeer) initializeFlags(cmd *cobra.Command) {
"noChmod",
}
+ // Remove these in Hugo 0.23.
+ if flagChanged(cmd.Flags(), "disable404") {
+ helpers.Deprecated("command line", "--disable404", "Use --disableKinds=404", false)
+ }
+
+ if flagChanged(cmd.Flags(), "disableRSS") {
+ helpers.Deprecated("command line", "--disableRSS", "Use --disableKinds=RSS", false)
+ }
+
+ if flagChanged(cmd.Flags(), "disableSitemap") {
+ helpers.Deprecated("command line", "--disableSitemap", "Use --disableKinds=sitemap", false)
+ }
+
for _, key := range persFlagKeys {
c.setValueFromFlag(cmd.PersistentFlags(), key)
}