Hi folks, I am trying to wrap my head around the best way to set up simple root level pages, e.g. foo.com/about. My understanding is that there are basically two options:
The first and older approach is to treat “about” as a section, so content/about/_index.md. Consistent with the docs, this defaults to using the layouts/_default/list.html template. Which would make intuitive sense for foo.com/posts, but less so for non-list dead-end pages like foo.com/about. I tried unsuccessfully to override this with layout = "single"
etc. in front matter.
The second approach (e.g. detailed here) is content/about.md.
Which mostly works for me – the content renders – except I don’t understand how Hugo determines what layout, if any, to use. According to the above link, it should use layouts/_default/single.html, which is what I want, but it only does that if there is front matter in content/about.md. Even empty front matter. No front matter, however, and about.md renders bare, without being wrapped in single.html.
Is this the expected behavior? How come? I see it possibly is based on this thread but I’d love to understand why.