shithub: hugo

Download patch

ref: 42b33102cf619e08c6b6a49a50a0995e8f14773f
parent: 2342655fde6ad4774492f3da5d3b53a70fabdad1
author: Anthony Fok <[email protected]>
date: Mon Jan 19 21:23:28 EST 2015

Quick-and-dirty way to print details of template errors

See Issue #316.

--- a/tpl/template.go
+++ b/tpl/template.go
@@ -1144,6 +1144,7 @@
 func (t *GoHtmlTemplate) AddTemplate(name, tpl string) error {
 	_, err := t.New(name).Parse(tpl)
 	if err != nil {
+		jww.ERROR.Println(err)
 		t.errors = append(t.errors, &templateErr{name: name, err: err})
 	}
 	return err