aboutsummaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-08-23 12:39:24 +0200
committerBjørn Erik Pedersen <[email protected]>2023-08-23 18:05:18 +0200
commitdcf425c846dcd6fbb0c05e87342077ab870eb7e1 (patch)
tree603f96feb9bb7a7503d86a4788dc5a6918ba4045 /config
parent9a8c84d6000fab3ec6847a330c45bfe24b76265d (diff)
downloadhugo-dcf425c846dcd6fbb0c05e87342077ab870eb7e1.tar.gz
hugo-dcf425c846dcd6fbb0c05e87342077ab870eb7e1.zip
Fix it so disable a module does not disable transitive dependency required by others
The motivation behind the original implementation was probably to show disabled modules when running `hugo mod graph`. Fixes #11376
Diffstat (limited to 'config')
-rw-r--r--config/allconfig/configlanguage.go2
-rw-r--r--config/allconfig/load.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/config/allconfig/configlanguage.go b/config/allconfig/configlanguage.go
index 534276c25..27ba00d82 100644
--- a/config/allconfig/configlanguage.go
+++ b/config/allconfig/configlanguage.go
@@ -140,7 +140,7 @@ func (c ConfigLanguage) GetConfigSection(s string) any {
return c.config.Permalinks
case "minify":
return c.config.Minify
- case "activeModules":
+ case "allModules":
return c.m.Modules
case "deployment":
return c.config.Deployment
diff --git a/config/allconfig/load.go b/config/allconfig/load.go
index b997c2896..3af6147da 100644
--- a/config/allconfig/load.go
+++ b/config/allconfig/load.go
@@ -84,7 +84,7 @@ func LoadConfig(d ConfigSourceDescriptor) (*Configs, error) {
return nil, fmt.Errorf("failed to create config: %w", err)
}
- configs.Modules = moduleConfig.ActiveModules
+ configs.Modules = moduleConfig.AllModules
configs.ModulesClient = modulesClient
if err := configs.Init(); err != nil {
@@ -471,7 +471,7 @@ func (l *configLoader) loadModules(configs *Configs) (modules.ModulesConfig, *mo
ex := hexec.New(conf.Security)
hook := func(m *modules.ModulesConfig) error {
- for _, tc := range m.ActiveModules {
+ for _, tc := range m.AllModules {
if len(tc.ConfigFilenames()) > 0 {
if tc.Watch() {
l.ModulesConfigFiles = append(l.ModulesConfigFiles, tc.ConfigFilenames()...)