From: Jonathan Anderson Date: Fri, 19 Jun 2015 13:30:34 +0000 (-0230) Subject: Use helpers.GetThemeDir() to find base templates. X-Git-Tag: v0.15~317 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c4ad8f6498ea5b629b68a39f2e9877313c17f4d3;p=brevno-suite%2Fhugo Use helpers.GetThemeDir() to find base templates. Now that we have the helpers.GetThemeDir() function, use it instead of calling directly into viper. --- diff --git a/tpl/template.go b/tpl/template.go index 7740850e..14a91290 100644 --- a/tpl/template.go +++ b/tpl/template.go @@ -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),