-
Notifications
You must be signed in to change notification settings - Fork 921
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
Nested menus in the horizontal navigation bar #311
Comments
I'll take a look! |
Would love to have that feature as well. Any news on this? @pauladambrookes would you share with us, how you modified navbar.html/config.toml? |
We too have struggled to get his working. The following references suggest it should be possible: However, we have had no success. Would be great if an example could be added. |
Any progress? |
I haven't had a chance to look at it myself yet, sorry. Do think about what your use case would be, and whether it will actually make it easier for users to navigate around your site - the Kubernetes Docsy site is very large and doesn't have drop downs except for where it gives you an entirely different version of the site, as provided in the template. It's also not obvious to me how you would show which option is currently selected in a top menu drop down (which is fine for language and version selectors as you can either version banner the entire site or you can see what language it's in), which means the user doesn't have an obvious visual cue like in the left nav for which bit of the site they're actually in/where to navigate back up out of it. If anyone has good examples, please add them! |
@pauladambrookes would be interested in your modification as well, could you please post your adaption here? |
@LisaFC I am new to hugo and I am trying to adopt Docsy. But, I may require this functionality .Do you have any update on this request. Thank you. |
This is exactly the use case. |
You can do links to entirely different versions of the site in the top nav with the existing template - the version drop-down is built in and you can call that menu whatever you like: https://www.docsy.dev/docs/adding-content/versioning/#adding-a-version-drop-down-menu Will that work for you @bbros-dev? |
I am also missing this functionality for grouping different items in a drop-down menu. as you have that funtionality for versions should it not be possible to implement this for custom items? |
I made this tiny change to try to add a single level of nested menus, but now I need to learn hugo modules so I can build and test.. anyone have any pointers on how I can get past this issue?
I found https://discourse.gohugo.io/t/resources-concat-with-js-slice-interface-not-supported-in-concat/26558/4 and so I removed |
@hcientist I ran into the same issue with Hugo Extended 0.102.3, and narrowed the issue to a missing resource. That is, preceding the "resource.Concat" function, the "resources.GetRemote" and "resources.Get" are fetching (in my case) 8 files to concatenate. Eg, one of the Get's in my case is...
To determine which of the 8 was failing, I injected 8 debug statements along the following lines...
...which prints to the terminal the Name of the file and its Contents (which could be quite lengthy). In any event, this allowed me to narrow down which of the 8 files was not being fetched... |
Im facing same issue.
|
This site is using Hugo/Docsy and appears to have managed it: https://www.cloudwego.io/ - see the "Documentation" drop down on the navbar. It seems they are also doing something with the navbar.html partials: https://github.com/cloudwego/cloudwego.github.io/blob/main/layouts/partials/navbar.html I would love this feature too. |
I would also like to request this issue. I need a dropdown menu for the different versions and a different one with links to outside pages. With the current setup, the suggestion does not really work. |
Although the theme has drop-down nested menus for languages and versions, there seems no way to create custom drop-down menus. Which is an issue if your documentation site is very large.
I have managed to create them by modifying navbar.html and adding the menu entries to config.toml (using the parent field), but shouldn't this be built into the theme? It would be great if you could just define a sub-category in the frontmatter and it appears in the horizontal menu as a nested menu item.
The text was updated successfully, but these errors were encountered: