diff --git a/hugolib/site.go b/hugolib/site.go index 8c8735692..37deacbc2 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -269,6 +269,7 @@ func (s *Site) Process() (err error) { return } s.prepTemplates() + s.Tmpl.PrintErrors() s.timerStep("initialize & template prep") if err = s.CreatePages(); err != nil { return diff --git a/tpl/template.go b/tpl/template.go index 86e8ea2c1..3377b9a3d 100644 --- a/tpl/template.go +++ b/tpl/template.go @@ -50,6 +50,7 @@ type Template interface { AddTemplate(name, tpl string) error AddInternalTemplate(prefix, name, tpl string) error AddInternalShortcode(name, tpl string) error + PrintErrors() } type templateErr struct { @@ -1253,6 +1254,12 @@ func (t *GoHtmlTemplate) LoadTemplates(absPath string) { t.loadTemplates(absPath, "") } +func (t *GoHtmlTemplate) PrintErrors() { + for _, e := range t.errors { + jww.ERROR.Println(e.err) + } +} + func init() { funcMap = template.FuncMap{ "urlize": helpers.Urlize,