mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	Store supported config formats in a variable
This commit is contained in:
		
				
					committed by
					
						
						Bjørn Erik Pedersen
					
				
			
			
				
	
			
			
			
						parent
						
							c52045bbb3
						
					
				
				
					commit
					d9282cf98a
				
			@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user