mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-30 01:23:34 -05:00
restored behavior of respecting config values unless set by command flags. fixed #116
This commit is contained in:
parent
ef595aedfc
commit
6017599a3c
1 changed files with 12 additions and 3 deletions
|
@ -71,9 +71,18 @@ func init() {
|
||||||
|
|
||||||
func InitializeConfig() {
|
func InitializeConfig() {
|
||||||
Config = hugolib.SetupConfig(&CfgFile, &Source)
|
Config = hugolib.SetupConfig(&CfgFile, &Source)
|
||||||
|
|
||||||
|
if HugoCmd.PersistentFlags().Lookup("build-drafts").Changed {
|
||||||
Config.BuildDrafts = Draft
|
Config.BuildDrafts = Draft
|
||||||
|
}
|
||||||
|
|
||||||
|
if HugoCmd.PersistentFlags().Lookup("uglyurls").Changed {
|
||||||
Config.UglyUrls = UglyUrls
|
Config.UglyUrls = UglyUrls
|
||||||
|
}
|
||||||
|
|
||||||
|
if HugoCmd.PersistentFlags().Lookup("verbose").Changed {
|
||||||
Config.Verbose = Verbose
|
Config.Verbose = Verbose
|
||||||
|
}
|
||||||
if BaseUrl != "" {
|
if BaseUrl != "" {
|
||||||
Config.BaseUrl = BaseUrl
|
Config.BaseUrl = BaseUrl
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue