mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
parent
58da8554cb
commit
30885a6c5f
2 changed files with 20 additions and 0 deletions
|
@ -79,6 +79,7 @@ func LoadConfig(d ConfigSourceDescriptor) (*Configs, error) {
|
||||||
if err := configs.transientErr(); err != nil {
|
if err := configs.transientErr(); err != nil {
|
||||||
return nil, fmt.Errorf("failed to create config from modules config: %w", err)
|
return nil, fmt.Errorf("failed to create config from modules config: %w", err)
|
||||||
}
|
}
|
||||||
|
configs.LoadingInfo.ConfigFiles = append(configs.LoadingInfo.ConfigFiles, l.ModulesConfigFiles...)
|
||||||
} else if err := configs.transientErr(); err != nil {
|
} else if err := configs.transientErr(); err != nil {
|
||||||
return nil, fmt.Errorf("failed to create config: %w", err)
|
return nil, fmt.Errorf("failed to create config: %w", err)
|
||||||
}
|
}
|
||||||
|
|
19
testscripts/commands/server__watch_moduleconfig.txt
Normal file
19
testscripts/commands/server__watch_moduleconfig.txt
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
hugo server --disableLiveReload &
|
||||||
|
|
||||||
|
waitServer
|
||||||
|
stopServer
|
||||||
|
wait
|
||||||
|
! stderr .
|
||||||
|
stdout 'Watching for config changes in.*mytheme'
|
||||||
|
|
||||||
|
|
||||||
|
-- hugo.toml --
|
||||||
|
title = "Hugo Server Test"
|
||||||
|
baseURL = "https://example.org/"
|
||||||
|
disableKinds = ["section", "page", "taxonomy", "term", "RSS", "sitemap", "robotsTXT", "404"]
|
||||||
|
theme = "mytheme"
|
||||||
|
-- layouts/index.html --
|
||||||
|
foo: {{ .Site.Params.foo }}
|
||||||
|
-- themes/mytheme/hugo.toml --
|
||||||
|
[params]
|
||||||
|
foo = "bar"
|
Loading…
Reference in a new issue