Hello,
I’ve spent much uninterrupted time with
- https://gohugo.io/templates/lookup-order/
- https://gohugo.io/content-management/page-bundles/
- and the many support topics here
but something seemingly extremely simple continues to elude me. Here’s the location of my contact-page content:
content/contact/index.md
“Contact” is a Leaf Bundle. It will never have child pages, so it doesn’t get an _index.md
file, but rather an index.md
file.
And here’s the location of the layout i expect to render for the Contact page:
layouts/contact/single.html
The layout, however, is ignored. Instead, the layout in layouts/_default/single.html
is rendered.
If, however, i make these changes:
-
content/contact/index.md
→content/contact/_index.md
-
layouts/contact/single.html
→layouts/contact/section.html
then the template renders (with no changes to the front matter).
But, “Contact” is a Leaf Bundle, not a Branch Bundle. I don’t want to make it a Branch Bundle. I have this same problem with every other Leaf Bundle page on my site (e.g. content/about/index.md
, content/support/index.md
, etc.).
Based on the documentation, it doesn’t seem that i should not need to declare kind
, type
, or layout
in my front matter, given the architecture i’ve outlined above. It seems to me the default lookup order should render the single.html
template, just as it does section.html
templates.
What am i missing?