Skip to content

Commit

Permalink
Use helpers.GetThemeDir() to find base templates.
Browse files Browse the repository at this point in the history
Now that we have the helpers.GetThemeDir() function, use it instead of
calling directly into viper.
  • Loading branch information
trombonehero authored and bep committed Jun 25, 2015
1 parent 1058cb1 commit c4ad8f6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tpl/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit c4ad8f6

Please sign in to comment.