mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05: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:
parent
1058cb17d1
commit
c4ad8f6498
1 changed files with 1 additions and 3 deletions
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue