mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 22:16:02 +00:00
hugolib: Improve error message in .Render
This commit is contained in:
1 file changed
+1
-1
@@ -130,7 +130,7 @@ func (p *PageOutput) Render(layout ...string) template.HTML {
|
||||
if templ != nil {
|
||||
res, err := templ.ExecuteToString(p)
|
||||
if err != nil {
|
||||
helpers.DistinctErrorLog.Printf("in .Render: Failed to execute template %q for page %q", layout, p.pathOrTitle())
|
||||
helpers.DistinctErrorLog.Printf("in .Render: Failed to execute template %q: %s", layout, err)
|
||||
return template.HTML("")
|
||||
}
|
||||
return template.HTML(res)
|
||||
|
||||
Reference in new issue
Block a user