mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 14:40:43 +03:00
parent
e614d8a57c
commit
1157fef859
4 changed files with 61 additions and 67 deletions
|
@ -143,42 +143,8 @@ func (c *commandeer) loadConfig(running bool) error {
|
|||
initializeFlags(cmdV, cfg)
|
||||
}
|
||||
|
||||
if baseURL != "" {
|
||||
cfg.Set("baseURL", baseURL)
|
||||
}
|
||||
|
||||
if len(disableKinds) > 0 {
|
||||
cfg.Set("disableKinds", disableKinds)
|
||||
}
|
||||
|
||||
cfg.Set("logI18nWarnings", logI18nWarnings)
|
||||
|
||||
if theme != "" {
|
||||
cfg.Set("theme", theme)
|
||||
}
|
||||
|
||||
if themesDir != "" {
|
||||
cfg.Set("themesDir", themesDir)
|
||||
}
|
||||
|
||||
if destination != "" {
|
||||
cfg.Set("publishDir", destination)
|
||||
}
|
||||
|
||||
cfg.Set("workingDir", dir)
|
||||
|
||||
if contentDir != "" {
|
||||
cfg.Set("contentDir", contentDir)
|
||||
}
|
||||
|
||||
if layoutDir != "" {
|
||||
cfg.Set("layoutDir", layoutDir)
|
||||
}
|
||||
|
||||
if cacheDir != "" {
|
||||
cfg.Set("cacheDir", cacheDir)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -244,7 +210,7 @@ func (c *commandeer) loadConfig(running bool) error {
|
|||
return err
|
||||
}
|
||||
|
||||
cacheDir = config.GetString("cacheDir")
|
||||
cacheDir := config.GetString("cacheDir")
|
||||
if cacheDir != "" {
|
||||
if helpers.FilePathSeparator != cacheDir[len(cacheDir)-1:] {
|
||||
cacheDir = cacheDir + helpers.FilePathSeparator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue