mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
restored behavior of respecting config values unless set by command flags. fixed #116
This commit is contained in:
@@ -71,9 +71,18 @@ func init() {
|
||||
|
||||
func InitializeConfig() {
|
||||
Config = hugolib.SetupConfig(&CfgFile, &Source)
|
||||
Config.BuildDrafts = Draft
|
||||
Config.UglyUrls = UglyUrls
|
||||
Config.Verbose = Verbose
|
||||
|
||||
if HugoCmd.PersistentFlags().Lookup("build-drafts").Changed {
|
||||
Config.BuildDrafts = Draft
|
||||
}
|
||||
|
||||
if HugoCmd.PersistentFlags().Lookup("uglyurls").Changed {
|
||||
Config.UglyUrls = UglyUrls
|
||||
}
|
||||
|
||||
if HugoCmd.PersistentFlags().Lookup("verbose").Changed {
|
||||
Config.Verbose = Verbose
|
||||
}
|
||||
if BaseUrl != "" {
|
||||
Config.BaseUrl = BaseUrl
|
||||
}
|
||||
|
Reference in New Issue
Block a user