Fix module config watch regression

Fixes #11313
This commit is contained in:
Bjørn Erik Pedersen 2023-07-31 19:18:36 +02:00
parent 58da8554cb
commit 30885a6c5f
2 changed files with 20 additions and 0 deletions

View file

@ -79,6 +79,7 @@ func LoadConfig(d ConfigSourceDescriptor) (*Configs, error) {
if err := configs.transientErr(); err != nil {
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 {
return nil, fmt.Errorf("failed to create config: %w", err)
}

View 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"