mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-16 20:53:59 +02:00
Store supported config formats in a variable
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
c52045bbb3
commit
d9282cf98a
@@ -202,7 +202,7 @@ func (l configLoader) loadConfig(configName string, v *viper.Viper) (string, err
|
||||
filename = baseFilename
|
||||
}
|
||||
} else {
|
||||
for _, ext := range []string{"toml", "yaml", "yml", "json"} {
|
||||
for _, ext := range config.ValidConfigFileExtensions {
|
||||
filenameToCheck := baseFilename + "." + ext
|
||||
exists, _ := helpers.Exists(filenameToCheck, l.Fs)
|
||||
if exists {
|
||||
|
Reference in New Issue
Block a user