Description:
I have a menu.main entry with a link-less parent (identifier only) and 3 children using pageRef, structured for a dropdown:
menu:
main:
- identifier: devops
name: Dev Stuffs
weight: 1
- name: Git & Github
pageRef: /git
parent: devops
weight: 1
- name: Docker
pageRef: /docker
parent: devops
weight: 2
- name: Linux Fundamentals
pageRef: /linux
parent: devops
Desktop behavior: All 3 children link correctly to their respective pages.
Mobile behavior (hamburger menu): All 3 children link to the homepage (/) instead of their intended page.
Steps to reproduce:
- Add a
menu.main group as above, with a parent that has no url/pageRef (identifier only), and children using pageRef.
- Build and view the site on a mobile viewport / narrow browser window.
- Open the hamburger menu, expand the dropdown, and click any child item.
- Observe it navigates to the homepage instead of the target page.
Workaround found: Changing the children's pageRef to url (with the equivalent literal path, e.g. pageRef: /git → url: /git/) fixes the mobile links immediately. Desktop behavior is unaffected either way.
Environment:
- Hugo version:
hugo v0.163.3-4d22555aebf458d5d150500c9ac4bee5b24cf0d3+extended+withdeploy linux/amd64 BuildDate=2026-06-18T16:18:24Z VendorInfo=gohugoio
- Hextra version:
v0.12.3
Question: Why does this happen only on mobile and not desktop? Is this a known bug?
Description:
I have a
menu.mainentry with a link-less parent (identifier only) and 3 children usingpageRef, structured for a dropdown:Desktop behavior: All 3 children link correctly to their respective pages.
Mobile behavior (hamburger menu): All 3 children link to the homepage (
/) instead of their intended page.Steps to reproduce:
menu.maingroup as above, with a parent that has nourl/pageRef(identifier only), and children usingpageRef.Workaround found: Changing the children's
pageReftourl(with the equivalent literal path, e.g.pageRef: /git→url: /git/) fixes the mobile links immediately. Desktop behavior is unaffected either way.Environment:
hugo v0.163.3-4d22555aebf458d5d150500c9ac4bee5b24cf0d3+extended+withdeploy linux/amd64 BuildDate=2026-06-18T16:18:24Z VendorInfo=gohugoiov0.12.3Question: Why does this happen only on mobile and not desktop? Is this a known bug?