It would be much easier to debug Hugo sites if standard error messages were beautified in some way. For example, the error message below (message content is not relevant, just formatting)
Error: error building site: render: failed to render pages: render of "page" failed: "/site/layouts/_default/baseof.html:4:6": execute of template failed: template: _default/single.html:4:6: executing "_default/single.html" at <partial "head" .>: error calling partial: "/site/layouts/partials/head.html:8:4": execute of template failed: template: partials/head.html:8:4: executing "partials/head.html" at <partial "seo/structured-data" .>: error calling partial: "/site/layouts/partials/seo/structured-data.html:16:6": execute of template failed: template: partials/seo/structured-data.html:16:6: executing "partials/seo/structured-data.html" at <partial "seo/json-ld" .>: error calling partial: "/site/layouts/partials/seo/json-ld.html:1:14": execute of template failed: template: partials/seo/json-ld.html:1:14: executing "partials/seo/json-ld.html" at <partial "seo/utils/get-json-ld-dirty" .>: error calling partial: "/site/layouts/partials/seo/types/event.html:2:13": execute of template failed: template: partials/seo/types/event.html:2:13: executing "partials/seo/types/event.html" at <partialCached "seo/utils/get-type" $page $page.Permalink>: error calling partialCached: "/site/layouts/partials/seo/utils/get-type.html:3:7": execute of template failed: template: partials/seo/utils/get-type.html:3:7: executing "partials/seo/utils/get-type.html" at <.Param>: Param is not a method but has arguments
is currently rendered with soft line breaks in my console. But tt could be formatted like this:
Error: error building site: render: failed to render pages:
render of "page" failed: "/site/layouts/_default/baseof.html:4:6":
execute of template failed: template: _default/single.html:4:6:
executing "_default/single.html" at <partial "head" .>:
error calling partial: "/site/layouts/partials/head.html:8:4":
execute of template failed: template: partials/head.html:8:4:
executing "partials/head.html" at <partial "seo/structured-data" .>:
error calling partial: "/site/layouts/partials/seo/structured-data.html:16:6":
execute of template failed: template: partials/seo/structured-data.html:16:6:
executing "partials/seo/structured-data.html" at <partial "seo/json-ld" .>:
error calling partial: "/site/layouts/partials/seo/json-ld.html:1:14":
execute of template failed: template: partials/seo/json-ld.html:1:14:
executing "partials/seo/json-ld.html" at <partial "seo/utils/get-json-ld-dirty" .>:
error calling partial: "/site/layouts/partials/seo/types/event.html:2:13":
execute of template failed: template: partials/seo/types/event.html:2:13:
executing "partials/seo/types/event.html" at <partialCached "seo/utils/get-type" $page $page.Permalink>:
error calling partialCached: "/site/layouts/partials/seo/utils/get-type.html:3:7":
execute of template failed: template: partials/seo/utils/get-type.html:3:7:
executing "partials/seo/utils/get-type.html" at <.Param>:
Param is not a method but has arguments
Here I’ve just used line breaks, and in a arbitrary location, but it could be different. Anyway, line breaks themselves would perhaps suffice. This would immensely improve debugging with Hugo, and it seems straightforward to include.