Open snicolai-blog opened 1 month ago
You are right, but that info isn't easily available where this is printed, which is why I got lazy. The important info for me (to fix this) here is the info to the right.
It would be great if this could also apply to layout errors that are due to a content file being the culprit.
For example, I got this error recently:
Error: error building site: render: failed to render pages: render of "page" failed: "/app/layouts/blog/single.html:3:21": execute of template failed: template: blog/single.html:3:21: executing "main" at <.Fragments.HeadingsMap>: nil pointer evaluating *tableofcontents.Fragments.HeadingsMap
The problem is I have 500 posts and 300 drafts and there's no indication in the error which page is causing it. There's only a reference to a layout file to a function that is being used by those 800 posts.
Similarly I've gotten errors related to a nil
reference from a missing image where the error only mentioned the baseof
layout file being the issue but it's really due to a missing image in one of the 800 posts. It would be nice to see which content page that image is being referenced from.
Another option is to add "while processing <path to page>"
to the error message.
I use page objects in my blog, and the new EXIF reader prints error message files relative to the page object. I'd really like it to print them relative to the blog root, so I know which file. For example:
would be much better as:
If it makes sense to strip the content/posts portion off to shorten the error message, that's fine.