-
-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
menu: optionally disable index pages for sections #642
Comments
I've chimed into the discussion in the Hugo discourse forum but I think this is better kept here. Once I saw your request I started to poke around in the code. There are a few oddities related to this:
While I already have managed the menu creation, generating the breadcrumb and getting prev/next navigation right, is still an open thing. Also |
I would expect clicking on
I see what you're saying here. I think I would expect to maybe have it as a global default to never involve page navigation, but if it is per-page configurable then I agree with what you're saying.
I'm not 100% certain I'm following what you're saying here, but yeah I wouldn't expect someone to be able to close a section by clicking on it again. I would expect the only way to close a section would be to open a new section. |
I've pushed the changes and am pretty satisfied with the outcome. While a next official release will not come this week, feel free to test it directly from this repo. Feedback welcome! |
I took a look and the core functionality is definitely there. Any feedback I have is fairly nitpicky:
|
I don't have a problem with this. Actually that's how I am, too ;-)
That behaviour hasn't changed with this patch. --MENU-SECTIONS-ACTIVE-BG-color (and ---MENU-SECTION-ACTIVE-CATEGORY-BG-color) both refer to the currently displayed page and color related areas of the menu accordingly. The expand state of the menu is completly unrelated to this colors.
As stated in my previous comment, I find different click behavior for allegedly similar menu entries quite confusing for the user. |
I agree, but making it a global toggle would remove that confusion, for example:
Could make it so that section pages always exhibit this behavior and allow for clicking of the text. |
Right now I will keep it that way until further feedback from other users. The DOM and CSS would need some non trivial update for this to work, which is currently too much effort with not much gain. |
I would like to have the option to disable the index page for a given section, but still have that section appear on the menu.
For example, suppose I have the following layout
What I would like is for my navigation menu to still show “Posts” and “Articles,” and expand to show their subpages when clicked. However, I would like for the “Posts” and “Articles” entries in the menu to not redirect anywhere themselves. If I am on
/articles/article-one
and click onPosts
, I would like to remain on/articles/article-one
but have thePosts
section expanded.The text was updated successfully, but these errors were encountered: