Making section nested under page keep the page's path (even if it has a date)?

Consider the situation where you have a page /content/blog/2023-11-30_my-vaction/index.md that’s accessible via <base_url>/blog/my-vaction. If there were a section within that page’s same directory, e.g. /content/blog/2023-11-30_my-vacation/comments/_index.md, then it would be accessible via
<base_url>/blog/2023-11-30_my-vacation/comments.

Even though the section is nested within a page’s directory, their url path’s are different. Would it be wrong for Zola to allow sections nested within a page’s directory to respect the page’s path and remove the date from the section’s path as well?

I think the way things work now make sense, as pages are typically “leaves” of the website’s path tree, with collocation of assets being the only reason to put a page within a directory. However, there are extenuating circumstances where you want it the way I described, even if they’re not typical.

1 Like

That sounds like a bug it doesn’t respect the parent’s path.

Ok, interesting.

I was just looking at Zola’s rust code, and it seems like it basically just joins the file path and checks if it needs to append the lang at the end. I think, for the case I was mentioning, it would need to check if any of those components of the file path are pages, and use the Page struct to update that specific component.