diff options
author | Anton Harniakou <[email protected]> | 2019-01-31 15:06:18 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-02-01 07:17:37 +0100 |
commit | d9282cf98a346fcf98f363d9c353e4920ca85fc7 (patch) | |
tree | 440d1c8d3d5fc49f93c2df814003b75e84965ad6 /hugolib/paths | |
parent | c52045bbb38cbf64b9cb39352230060aa122cc9f (diff) | |
download | hugo-d9282cf98a346fcf98f363d9c353e4920ca85fc7.tar.gz hugo-d9282cf98a346fcf98f363d9c353e4920ca85fc7.zip |
Store supported config formats in a variable
Diffstat (limited to 'hugolib/paths')
-rw-r--r-- | hugolib/paths/themes.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/paths/themes.go b/hugolib/paths/themes.go index 1ce8e7997..4718720e1 100644 --- a/hugolib/paths/themes.go +++ b/hugolib/paths/themes.go @@ -120,7 +120,7 @@ func (c *themesCollector) getConfigFileIfProvided(theme string) string { ) // Viper supports more, but this is the sub-set supported by Hugo. - for _, configFormats := range []string{"toml", "yaml", "yml", "json"} { + for _, configFormats := range config.ValidConfigFileExtensions { configFilename = filepath.Join(configDir, "config."+configFormats) exists, _ = afero.Exists(c.fs, configFilename) if exists { |