-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
leaf bundle layout lookup order is wrong/different than branch bundle #5714
Comments
What does the documentation say about this? |
Lots of things. https://gohugo.io/templates/lookup-order/
I'd expect my case the most specific, since I set the layout in front matter. Also branch bundles seems to work as expected. It's the leaf bundles that act weird. Let's see the examples that could apply here:
This means that in my example, the /leafbundle/ should at least use /layout/leafbundle/single.html, but even if I rename it to single.html, it doesn't work as expected, and still uses the default template instead. |
I'm getting more and more sure that leaf bundles don't follow the documentation at all. |
See this table, which would apply to "leaf bundles": https://gohugo.io/templates/lookup-order/#examples-layout-lookup-for-regular-pages |
I suspect this issue is mostly about the lookup rules being a little har do understand. We may improve on that in the future, but I suggest you take further questions here: https://discourse.gohugo.io/ |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hugo Static Site Generator v0.54.0-B1A82C61 windows/amd64 BuildDate: 2019-02-01T09:42:02Z
Using Windows 10 latest.
Leaf bundles prioritize the /_default/single.html over /bundlename/bundlename.html
So
prioritizes
but the
prioritizes
over
Even if you set the layout in the content front matter, it uses the single.html
Example: https://github.com/dotleon/leafbundlelayoutissue
In this example, one would expect /leafbundle/ and /leafbundlewithlayout/ to use the /layout/leafbundle/leafbundle, instead they're using /layout/_default/single.html
BUT
/branchbundle/ is using the /layout/branchbundle/branchbundle.html
The text was updated successfully, but these errors were encountered: