first layer down, assumed to be lists of things, rendered by list.html
second layer down, assumped to be individual items, rendered by single.html
What if my hierarchy is more complex/varied than that? E.g.
/ (front page)
/about/ (and no pages below)
/product/family/item/color/ (individual item)
/product/family/item/ (list)
/product/family/ (list)
/product/ (list)
How can I map those to list.html vs single.html? I was thinking I could simply specify whether I wanted something to be treated as a list, or as an item, by adding “type: single” or such to the front matter of the various _index.md, but I’m not succeeding (but maybe I am doing it wrong).
Is there an example somewhere that would show how to do this, assuming it can be done?
Are you saying that if I name it index.html, Hugo will use single.html, and if I name it _index.html, Hugo will use list.html? If so, as conventions go, this one is … non-obvious.
Obvious is in the eye of the beholder For example the About page in the example on https://gohugo.io/content-management/organization/ uses an _index.md although it has no children. While I understand now this is legal, it’s also somewhat misleading as there is no list of anything.
That may be a mistake, and an easy one for you to contribute a fix by creating an issue seeking clarification and then correcting it (as it is just removing an underscore).