Proposal/Question: Transparent modes

I use sections a lot, and this is the main way of organizing posts for me. I use URL parts to display them in the navigation bar so that the user would know in which section they are.
However, on the index page (a.k.a. parent section) I’d like to show a list of the recent posts.

Currently, I can see two ways of achieving this:

Transparent mode

Set transparent=true in the configuration of each section.

This works just fine, but I’m not happy, since all the pages actually moved into the parent section. So, the URL of each page is different now, by default it points to the parent-section/post.html and parent-section/child-section/post.html just redirects to the former address.

I’d like to have it that other way around: pages belong to their “real” section and the parent just host redirects

Collecting pages manually

The other approach would be to go through all subsection in the parent page, collect posts and then sort them by date.

This produces even more problems than it solves. Fist of all, there might be a grand-section inside a child one, so this needs to be somehow recursive. Second, I’m using pagination and if one child section contains so many new posts that they become paginated, then posts from the second page won’t be in the resulting list.

Solution?

As a solution I can propose adding transparent_mode section configuration option, which can take values child or parent with the latest as default one. This will change the behavior of how pages are being passed to the parent.

In parent mode the behavior remains the same as it is now. Parent becomes the new “home” for the posts, which is reflected in the URL.

In child mode, the URL remains the same and the parent just gets the links.

Will this change make sense? Or do you folks think that this use case is too specific?

2 Likes

@keats, any thoughts on this? I can start working on an implementation.

I think this is too specific, let’s see if more people need it but I’m not too sold on that.