Skip to content
This repository has been archived by the owner on Jul 8, 2021. It is now read-only.

footer navigation for nested sections #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lambdafu
Copy link

Oh well. This probably needs to be a global configuration option. In my case, I want to use top level sections for parts in a multivolume book, and subsections for chapters in the individual volumes. Currently, the weights need to be globally unique and monotone across all sections and subsections for navigation to work as expected.

In my case, I prefer local weights within each book (among the subsections) and local weights for all menu entries.

This patch implements that.

First, it uses PrevInSection and NextInSection to link subsections together. If you use index pages for the sections (as enabled in #42), and give them the weight 0, they are linked into the flow at the beginning. Of course, all subsections should be in a book-specific directory.

The homepage footer has been removed. It didn't work properly anyway, using publication date to find the next link. Using subsections for the home page is not very useful, so there is no special support for that (I am not even sure how that would look like).

Unfortunately, this removes footers from the non-nested sections case entirely, and that's not proper. So, I think there should be a global configuration option to control this.

What do you think?

@lambdafu
Copy link
Author

Fixes #4 (maybe).

@lambdafu
Copy link
Author

Here is my example project illustrating this: https://github.com/lambdafu/hugo-material-book

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant