summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-04-30 21:52:56 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-05-01 15:13:41 +0200
commit8a49c0b3b8b5a374a64b639f46806192cd663fc9 (patch)
tree540b8ae405e69829957f8cb75832d82977adca61 /hugolib
parenta3bf118eaa0796892047bb7456fe89824e423f27 (diff)
tpl/collections: Make it a package that stands on its own
See #3042
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/alias.go4
-rw-r--r--hugolib/hugo_sites_build.go2
-rw-r--r--hugolib/page.go2
-rw-r--r--hugolib/shortcode.go2
-rw-r--r--hugolib/site.go2
5 files changed, 6 insertions, 6 deletions
diff --git a/hugolib/alias.go b/hugolib/alias.go
index d1a1b5534..20be7c732 100644
--- a/hugolib/alias.go
+++ b/hugolib/alias.go
@@ -44,12 +44,12 @@ func init() {
}
type aliasHandler struct {
- t tpl.TemplateHandler
+ t tpl.TemplateFinder
log *jww.Notepad
allowRoot bool
}
-func newAliasHandler(t tpl.TemplateHandler, l *jww.Notepad, allowRoot bool) aliasHandler {
+func newAliasHandler(t tpl.TemplateFinder, l *jww.Notepad, allowRoot bool) aliasHandler {
return aliasHandler{t, l, allowRoot}
}
diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go
index e694ab52f..58088fd7c 100644
--- a/hugolib/hugo_sites_build.go
+++ b/hugolib/hugo_sites_build.go
@@ -111,7 +111,7 @@ func (h *HugoSites) initRebuild(config *BuildCfg) error {
// This is for the non-renderable content pages (rarely used, I guess).
// We could maybe detect if this is really needed, but it should be
// pretty fast.
- h.Tmpl.RebuildClone()
+ h.TemplateHandler().RebuildClone()
}
for _, s := range h.Sites {
diff --git a/hugolib/page.go b/hugolib/page.go
index 1e9c06af7..bed2e254e 100644
--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -1389,7 +1389,7 @@ func (p *Page) prepareLayouts() error {
if p.Kind == KindPage {
if !p.IsRenderable() {
self := "__" + p.UniqueID()
- err := p.s.Tmpl.AddLateTemplate(self, string(p.Content))
+ err := p.s.TemplateHandler().AddLateTemplate(self, string(p.Content))
if err != nil {
return err
}
diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go
index d72a96faa..01beffe2b 100644
--- a/hugolib/shortcode.go
+++ b/hugolib/shortcode.go
@@ -565,7 +565,7 @@ func replaceShortcodeTokens(source []byte, prefix string, replacements map[strin
return source, nil
}
-func getShortcodeTemplate(name string, t tpl.TemplateHandler) *tpl.TemplateAdapter {
+func getShortcodeTemplate(name string, t tpl.TemplateFinder) *tpl.TemplateAdapter {
isInnerShortcodeCache.RLock()
defer isInnerShortcodeCache.RUnlock()
diff --git a/hugolib/site.go b/hugolib/site.go
index 394549c41..4f7c2c5fb 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -676,7 +676,7 @@ func (s *Site) reProcess(events []fsnotify.Event) (whatChanged, error) {
s.Log.ERROR.Println(err)
}
- s.Tmpl.PrintErrors()
+ s.TemplateHandler().PrintErrors()
for i := 1; i < len(sites); i++ {
site := sites[i]