-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn if template specified by "layout" in front matter does not exist #3171
Comments
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
#3514 would be a good place for this. |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
I think solving this issue is critical for better site debug. Please don't let this just drop off. |
I think this would be more useful in this area: #4481 -- I'm not totally sure about this one. |
Solution to that issue would be even better! May be that trace shows a warning that as the layout specified in front matter does not exist, Hugo is using the default available as per lookup order. |
I'm not sure when this changed, but we do not "silently drop content" if the layout specified in front matter does not exist. Instead, we fallback to Hugo's defined lookup order. |
Followup to discussion on forum.
If files include a
layout =
value in their frontmatter, and there is no matching template, they are silently ignored.Instead, some sort of error should be generated, or at least a warning. Something along the lines of:
No template matching layout 'foo' for file/name/here.md
This would have saved me quite a bit of debugging time.
The text was updated successfully, but these errors were encountered: