aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/collect.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/collect.go')
-rw-r--r--modules/collect.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/collect.go b/modules/collect.go
index ae6df9be9..fcde1d379 100644
--- a/modules/collect.go
+++ b/modules/collect.go
@@ -423,12 +423,14 @@ func (c *collector) applyThemeConfig(tc *moduleAdapter) error {
err error
)
- // Viper supports more, but this is the sub-set supported by Hugo.
- for _, configFormats := range config.ValidConfigFileExtensions {
- configFilename = filepath.Join(tc.Dir(), "config."+configFormats)
- hasConfigFile, _ = afero.Exists(c.fs, configFilename)
- if hasConfigFile {
- break
+LOOP:
+ for _, configBaseName := range config.DefaultConfigNames {
+ for _, configFormats := range config.ValidConfigFileExtensions {
+ configFilename = filepath.Join(tc.Dir(), configBaseName+"."+configFormats)
+ hasConfigFile, _ = afero.Exists(c.fs, configFilename)
+ if hasConfigFile {
+ break LOOP
+ }
}
}