docs: fix Self-Hosting nav (empty collapsible folder → linked folder+index) #72
Reference in New Issue
Block a user
Delete Branch "docs/fix-self-hosting-nav"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug (reported): clicking Self hosting in the sidebar only toggled an empty dropdown and never navigated.
Cause:
content/docs/self-hosting.mdx(the page) andcontent/docs/self-hosting/(a folder withadmin-token.mdx) coexisted under the same name. fumadocs turned the directory into a collapsible folder with no index, so the page was unreachable from the folder header, and the explicitself-hosting/admin-tokenroot-meta entry pulled the only child out to top level — leaving the folder empty.Fix (canonical fumadocs folder-with-index — same pattern as the changelog & api-reference folders):
self-hosting.mdx→self-hosting/index.mdx(folder header now links to/docs/self-hosting)self-hosting/meta.json:{title, pages:[index, admin-token]}meta.json: collapseself-hosting+self-hosting/admin-tokeninto the singleself-hostingfolder entryURLs unchanged —
/docs/self-hostingand/docs/self-hosting/admin-tokenboth still resolve (no broken inbound links). Verified in built HTML: folder headerhref=/docs/self-hosting, admin-token nested as child.npm run buildgreen.Bug (reported): clicking 'Self hosting' in the sidebar only toggled an empty dropdown and never navigated. Cause: content/docs/self-hosting.mdx (the page) and content/docs/self-hosting/ (a folder with admin-token.mdx) coexisted under the same name. fumadocs turned the directory into a collapsible folder with no index, so the page was unreachable from the folder header and the explicit 'self-hosting/admin-token' root-meta entry pulled the only child out to top level — leaving the folder empty. Fix (canonical fumadocs folder-with-index, same pattern as changelog/api-reference): - self-hosting.mdx → self-hosting/index.mdx (folder header now links to /docs/self-hosting). - self-hosting/meta.json: {title, pages:[index, admin-token]}. - root meta.json: collapse 'self-hosting' + 'self-hosting/admin-token' into the single 'self-hosting' folder entry. URLs unchanged (/docs/self-hosting and /docs/self-hosting/admin-token both still resolve) — no broken inbound links. Verified in built HTML: folder header href=/docs/self-hosting, admin-token nested. Build green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Nav fix verified in built HTML: Self-Hosting folder header links to /docs/self-hosting, admin-token nested; URLs unchanged. LGTM.