Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Anderson <jonathan.anderson@ieee.org>2015-06-19 16:30:34 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2015-06-25 19:05:43 +0300
commitc4ad8f6498ea5b629b68a39f2e9877313c17f4d3 (patch)
treeb44909106530c1fd885a9f409dc6e5de9f792b45 /tpl/template.go
parent1058cb17d14ea404838e759ebe028e3ad992668a (diff)
Use helpers.GetThemeDir() to find base templates.
Now that we have the helpers.GetThemeDir() function, use it instead of calling directly into viper.
Diffstat (limited to 'tpl/template.go')
-rw-r--r--tpl/template.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/tpl/template.go b/tpl/template.go
index 7740850eb..14a912901 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),