summaryrefslogtreecommitdiffstats
path: root/tpl/template.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-07-30 17:28:40 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-07-30 17:28:40 +0200
commit285807ba7a63b3032173b7a72fdbe30784268f56 (patch)
tree55b71da3671c151de418763582fe53e13b35d96c /tpl/template.go
parentec23aa998a73ee0aaa31e1c98ac8474c3262b9ab (diff)
Take 2: Load templates from the Afero source fs
See #2321
Diffstat (limited to 'tpl/template.go')
-rw-r--r--tpl/template.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/tpl/template.go b/tpl/template.go
index eb478325d..4cc818f87 100644
--- a/tpl/template.go
+++ b/tpl/template.go
@@ -456,8 +456,9 @@ func (t *GoHTMLTemplate) loadTemplates(absPath string, prefix string) {
}
return nil
}
-
- filepath.Walk(absPath, walker)
+ if err := helpers.SymbolicWalk(hugofs.Source(), absPath, walker); err != nil {
+ jww.ERROR.Printf("Failed to load templates: %s", err)
+ }
}
func (t *GoHTMLTemplate) LoadTemplatesWithPrefix(absPath string, prefix string) {