mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	Use helpers.GetThemeDir() to find base templates.
Now that we have the helpers.GetThemeDir() function, use it instead of calling directly into viper.
This commit is contained in:
		
				
					committed by
					
						
						Bjørn Erik Pedersen
					
				
			
			
				
	
			
			
			
						parent
						
							1058cb17d1
						
					
				
				
					commit
					c4ad8f6498
				
			@@ -21,7 +21,6 @@ import (
 | 
			
		||||
	"github.com/spf13/hugo/helpers"
 | 
			
		||||
	"github.com/spf13/hugo/hugofs"
 | 
			
		||||
	jww "github.com/spf13/jwalterweatherman"
 | 
			
		||||
	"github.com/spf13/viper"
 | 
			
		||||
	"github.com/yosssi/ace"
 | 
			
		||||
	"html/template"
 | 
			
		||||
	"io"
 | 
			
		||||
@@ -306,8 +305,7 @@ func (t *GoHTMLTemplate) loadTemplates(absPath string, prefix string) {
 | 
			
		||||
 | 
			
		||||
					currBaseAceFilename := fmt.Sprintf("%s-%s", helpers.Filename(path), baseAceFilename)
 | 
			
		||||
					templateDir := filepath.Dir(path)
 | 
			
		||||
					themeDir := filepath.Join(
 | 
			
		||||
						viper.GetString("WorkingDir"), "themes", viper.GetString("theme"))
 | 
			
		||||
					themeDir := helpers.GetThemeDir()
 | 
			
		||||
 | 
			
		||||
					pathsToCheck := []string{
 | 
			
		||||
						filepath.Join(templateDir, currBaseAceFilename),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user