mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
commands, hugolib: Deprecate disable404, disableRSS, disableSitemap, disableRobotsTXT
Use disableKinds instead. Fixes #3345
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user