I’m working on adding sorting and
higher fields to sections (@keats noted here that them being missing is a bug), and I stumbled upon one small inconsistency while writing tests.
Now sections can be “transparent”, which means that they reparent their pages to the ancestor section. But this doesn’t apply to subsections. So if we have something like:
└─content/wiki/_index.md weight=0 transparent=true
… the structure will be preserved, and
transparent=true will kinda be ignored.
I would expect Zola to flatten the subsection list, so we would get:
Is this a bug, or is it supposed to work like this? Should I fix it?
Hmm that’s a good question. I’m not entirely sure what should be the outcome since I didn’t think of
transparent as something over sections. If we make that feature, I think it should be opt-in in some ways?
A real-life use case would be this one:
Imagine a user who prefers storing their posts organized by date. (e.g.
In addition, they write an ongoing series of posts named
I would expect the end result to look like:
While currently only the posts “bubble up”:
To me, it seems more like a bug, tbh.
Here’s a toy project to test this.