zudo-doc-navigation-design
Navigation design rules for zudo-doc documentation sites. Consult before creating new pages, restructuring directories, or designing header navigation. Covers: 3-level hierarchy (header → sidebar → ne...
zudo-doc Navigation Design Rules
IMPORTANT: Consult these rules before creating new doc pages, adding categories, or designing the site’s navigation. AI tools tend to pattern-match to personal preference and produce chaotic structures; this skill encodes the correct approach.
Reference Documentation
The full guide lives at src/. Read it for examples and the gaming-wiki walkthrough. This skill is the short version.
The 3-Level Hierarchy
zudo-doc has exactly three levels. Do not invent more:
- Header nav — the biggest categories (3–6 items max)
- Sidebar — all pages in the active category (generated from the filesystem)
- Nested sidebar categories — subsections within a sidebar (2–3 levels of nesting max)
Each level narrows scope. Never jump levels — do not put a specific page directly in the header, and do not hide a whole category in a nested sidebar fold.
File Structure IS the Navigation
This is the single most important rule. The directory tree under src/ is the navigation. There is no separate config to keep in sync.
- A directory becomes a sidebar category. Its
index.mdxis the category landing page. - A file becomes a sidebar item.
- Subdirectories become nested collapsible categories.
- The
headerNavsetting maps top-level directories to header items viacategoryMatch.
Consequence: design the filesystem with navigation in mind from the start. Do not reorganize the sidebar via config hacks — reorganize the files.
Header Navigation Rules
The header is the topmost level. It holds only the biggest categories.
- 3–6 items max. More than 6 overwhelms users and wraps the header.
- Each item is a broad section, not a page. “Guides” ✓, “How to install” ✗.
categoryMatchmust be a single top-level directory name. Multi-segment values (e.g."platforms/xbox") break active-state highlighting. If you need nested grouping, use a header-level dropdown with children — not a path.- Dropdowns are for closely related sections only. “Learn > Guides, Components” makes sense. “Everything > 7 miscellaneous items” does not — split into separate header items instead.
Sidebar Structure Rules
The sidebar is generated from the filesystem. The rules are about how you organize files:
- Every category directory MUST have an
index.mdx. Without it, the category has no landing page and may not appear correctly. The index’ssidebar_positionsets the category’s position. - Every page MUST set
sidebar_position. Without it, pages sort alphabetically — which is almost never what you want. This is the single most common AI mistake. - Nesting depth: 2–3 levels max. Deep nesting hides content. If you need more, the header nav is probably missing a category — split it out.
- Each sidebar section should cover one cohesive topic. Do not mix unrelated themes in the same sidebar (e.g. “Hardware” and “Community Events” under the same section).
- Use kebab-case directory and file names.
my-article.mdx, notmyArticle.mdx.
Checklist for Adding a New Page
Before creating any new doc page, check this list:
- Which header category does it belong under? (If none fits, either add a header category or rethink whether this page is really needed.)
- Which sidebar section inside that header category?
- Does the target directory exist? If yes, does it have an
index.mdx? - Have you set
sidebar_positionin the frontmatter? - Is the file name in kebab-case?
- For bilingual projects: have you created the matching file under
src/(or addedcontent/ docs- ja/ generated: trueif it is skipped)?
Checklist for Adding a New Category
Before creating any new category directory:
- Is this really a new category, or does it belong under an existing one? Default to “fewer categories.”
- Does it need a header nav entry, or is it a nested sidebar category inside an existing header entry?
- Have you created
index.mdxwith a descriptive landing page andsidebar_position? - If you added a header entry, does its
categoryMatchvalue equal the new top-level directory name (single segment)? - Does the new category have at least 3 pages? Fewer than 3 usually means the pages belong under a broader category instead.
Common Mistakes (Do Not Do)
- Putting specific pages in the header nav. The header is for categories, not pages. “Getting Started” ✓, “Installation tutorial” ✗.
- Deep nesting (4+ levels). If you find yourself nesting deeply, the header is probably missing a category.
- Mixing unrelated topics in one sidebar section. Split them.
- Missing
sidebar_positionon pages. Leads to unpredictable alphabetical order. - Missing
index.mdxin category directories. Category has no landing page. - Multi-segment
categoryMatch(e.g."platforms/xbox"). Breaks active highlighting — use a single top-level directory name. - Reorganizing via config instead of filesystem. If you are tempted to add a custom sidebar config override, the underlying filesystem is probably wrong. Fix the files instead.
When in Doubt
If you are not sure whether a page belongs in header, sidebar, or nested sidebar: ask for the current navigation tree first, draw it out, and place the new page where it fits the hierarchy. Never add pages to “whatever directory is closest” without considering the whole structure.