Skip to content

Commit

Permalink
Fix module config watch regression
Browse files Browse the repository at this point in the history
Fixes #11313
  • Loading branch information
bep committed Aug 1, 2023
1 parent 58da855 commit 30885a6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/allconfig/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
19 changes: 19 additions & 0 deletions testscripts/commands/server__watch_moduleconfig.txt
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 30885a6

Please sign in to comment.