Misc depreation updates

* Deprecate .Page.Path when backed by a file
* site.Permalinks
* --ignoreVendor (use --ignoreVendorPaths)

Closes #9348
Closes #9349
This commit is contained in:
Bjørn Erik Pedersen
2022-01-04 13:07:10 +01:00
parent 56ab83a597
commit 2b6063c3e3
19 changed files with 52 additions and 58 deletions

View File

@@ -53,7 +53,6 @@ var ErrNoConfigFile = errors.New("Unable to locate config file or config directo
// LoadConfig loads Hugo configuration into a new Viper and then adds
// a set of defaults.
func LoadConfig(d ConfigSourceDescriptor, doWithConfig ...func(cfg config.Provider) error) (config.Provider, []string, error) {
if d.Environment == "" {
d.Environment = hugo.EnvironmentProduction
}
@@ -110,15 +109,8 @@ func LoadConfig(d ConfigSourceDescriptor, doWithConfig ...func(cfg config.Provid
}
// Config deprecations.
// We made this a Glob pattern in Hugo 0.75, we don't need both.
if l.cfg.GetBool("ignoreVendor") {
helpers.Deprecated("--ignoreVendor", "Use --ignoreVendorPaths \"**\"", true)
l.cfg.Set("ignoreVendorPaths", "**")
}
if l.cfg.GetString("markup.defaultMarkdownHandler") == "blackfriday" {
helpers.Deprecated("markup.defaultMarkdownHandler=blackfriday", "See https://gohugo.io//content-management/formats/#list-of-content-formats", false)
}
// Some settings are used before we're done collecting all settings,