hugo-PaperMod
hugo-PaperMod copied to clipboard
Support navbar child items
What does this PR change? What problem does it solve?
In the navbar, allow to display child items on mouse hover. Also works on mobile when you stay with your finger pressed for a bit.
For example with this setup in config.yml
menu:
main:
- identifier: blog
name: Blog
url: /
weight: 1
- name: Tags
parent: blog
url: /tags/
weight: 1
# ...
We get the result below (live demonstration here)

Was the change discussed in an issue or in the Discussions before?
No
PR Checklist
- [ ] This change adds/updates translations and I have used the template present here. -> Not relevant
- [x] I have enabled maintainer edits for this PR.
- [x] I have verified that the code works as described/as intended.
- [ ] This change adds a Social Icon which has a permissive license to use it. -> Not relevant
- [x] This change does not include any CDN resources/links.
- [x] This change does not include any unrelated scripts such as bash and python scripts.
- [ ] This change updates the overridden internal templates from HUGO's repository. -> Not relevant
For me, this is adding an underscore under the navbar and putting the parent/child combo at the end of the navbar.
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
For me, this is adding an underscore under the navbar and putting the parent/child combo at the end of the navbar.
Well seen ! It worked well with multiple menu items but when there was only one the css for the carret down would go crazy, it is fixed now :)
What does this PR change? What problem does it solve?
In the navbar, allow to display child items on mouse hover. Also works on mobile when you stay with your finger pressed for a bit.
For example with this setup in
config.ymlmenu: main: - identifier: blog name: Blog url: / weight: 1 - name: Tags parent: blog url: /tags/ weight: 1 # ...We get the result below (live demonstration here)
Was the change discussed in an issue or in the Discussions before?
No
PR Checklist
- [ ] This change adds/updates translations and I have used the template present here. -> Not relevant
- [x] I have enabled maintainer edits for this PR.
- [x] I have verified that the code works as described/as intended.
- [ ] This change adds a Social Icon which has a permissive license to use it. -> Not relevant
- [x] This change does not include any CDN resources/links.
- [x] This change does not include any unrelated scripts such as bash and python scripts.
- [ ] This change updates the overridden internal templates from HUGO's repository. -> Not relevant
That is a good alternative to this...

If we can't have what is shown in my screenshot above, then your pr is a really good alternative and should be merged asap.
Sorry if I'm late to the party, is there any movement on the navbar sub menus? Would love to have the option and appreciate your work/effort!