mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Quick-and-dirty way to print details of template errors
See Issue #316.
This commit is contained in:
parent
2342655fde
commit
42b33102cf
1 changed files with 1 additions and 0 deletions
|
@ -1144,6 +1144,7 @@ func (t *GoHtmlTemplate) AddInternalShortcode(name, content string) error {
|
||||||
func (t *GoHtmlTemplate) AddTemplate(name, tpl string) error {
|
func (t *GoHtmlTemplate) AddTemplate(name, tpl string) error {
|
||||||
_, err := t.New(name).Parse(tpl)
|
_, err := t.New(name).Parse(tpl)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
jww.ERROR.Println(err)
|
||||||
t.errors = append(t.errors, &templateErr{name: name, err: err})
|
t.errors = append(t.errors, &templateErr{name: name, err: err})
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue