From 708bc78770a0b0361908f6404f57264c53252a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 28 Jul 2016 09:30:58 +0200 Subject: Optimize the multilanguage build process Work In Progress! This commit makes a rework of the build and rebuild process to better suit a multi-site setup. This also includes a complete overhaul of the site tests. Previous these were a messy mix that were testing just small parts of the build chain, some of it testing code-paths not even used in "real life". Now all tests that depends on a built site follows the same and real production code path. See #2309 Closes #2211 Closes #477 Closes #1744 --- tpl/template.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tpl/template.go') diff --git a/tpl/template.go b/tpl/template.go index 4cc818f87..479298976 100644 --- a/tpl/template.go +++ b/tpl/template.go @@ -336,6 +336,8 @@ func (t *GoHTMLTemplate) AddTemplateFile(name, baseTemplatePath, path string) er return err } + jww.DEBUG.Printf("Add template file from path %s", path) + return t.AddTemplate(name, string(b)) } @@ -366,11 +368,12 @@ func isBaseTemplate(path string) bool { } func (t *GoHTMLTemplate) loadTemplates(absPath string, prefix string) { + jww.DEBUG.Printf("Load templates from path %q prefix %q", absPath, prefix) walker := func(path string, fi os.FileInfo, err error) error { if err != nil { return nil } - + jww.DEBUG.Println("Template path", path) if fi.Mode()&os.ModeSymlink == os.ModeSymlink { link, err := filepath.EvalSymlinks(absPath) if err != nil { -- cgit v1.2.3