I think you answered a different question than @jkinley asked. But I am curious to know which question you were trying to answer. In any case, it’s not as simple as you say.
By default content section sub-structures DO define the output file structure. Permlink config allows you to override it. I’m not sure what you mean by “Hugo does not have cascading sections”? That it doesn’t do it automatically beyond level 1? Yes. And no: If I have the following in my content dir, a section will be generated at every node:
But it won’t if I have:
Hugo has a lot of surprising and inconsistent behavior that makes it very un-user-friendly. but that’s another topic.
@jkinley, I don’t know how to do what you ask off the top of my head since I don’t write templates much, but you need to create a slice value, append both the .Section and .Pages slices to it, sort it as you want, and then range over it as you are doing for the separate slices. (I hate the fact that I am saying “slice” instead of “list”; that one has to understand Go to code templates seems wrong; but I think topics on the forum use “slice” so you’ll find more answers that way)