THE GITHTML FIELD GUIDE

Find why a MkDocs page is missing from navigation

Check whether MkDocs found the source page, whether the navigation configuration includes it, and whether an exclusion prevents it from being built. These are separate questions. Resolve paths relative to the documented content directory, then inspect the production build rather than assuming a page visible during local serving will appear in the published output.

Separate a missing page from a missing navigation entry

A document can exist in the output without being listed in the sidebar. Conversely, a configured navigation entry can point to a source that does not exist or is excluded. Start by identifying which symptom you have. Locate the configured docs directory and the page's actual filename, including case. Check whether navigation is automatically inferred or explicitly defined. Do not rename files randomly to make them appear; that can break existing links. Record the intended role of the page: a primary navigation destination, a supporting page reached through links, or a draft that should not be published yet.

Inspect the smallest relevant configuration

The sample shows an explicit navigation mapping with paths relative to the content directory. Compare it with the project configuration and any inherited settings. Check exclusion and draft rules separately from navigation omission rules. A page intentionally absent from the menu is not necessarily absent from the build, and menu omission is not access control. Use a disposable local output directory when testing changes. Preserve the original configuration so you can compare one adjustment at a time. Read the build diagnostics rather than relying solely on whether the sidebar looks right in the browser; the warning often identifies the exact source path involved.

yaml
site_name: Sample handbook
nav:
  - Overview: index.md
  - Configuration: reference/configuration.md

Verify both discovery and publication behavior

Build the site locally and inspect whether the expected HTML page exists. Follow the navigation entry and a direct link to the page. Confirm that its title and surrounding hierarchy match the intended reading route. If the page is a draft, verify its production behavior explicitly rather than assuming the development server's view represents publication. Recheck inbound links after any filename change. Keep a small navigation checklist for new pages: source discovered, publication intended, menu placement deliberate, and links verified. This prevents future contributors from treating the sidebar as a complete inventory or as a security boundary around unpublished information.

  1. Determine whether the page is absent from output, absent from navigation, or both.
  2. Check the configured content directory, exact filename, explicit nav, and exclusion rules.
  3. Inspect local build diagnostics and the generated file independently.
  4. Test menu and direct links, and never treat navigation omission as confidentiality.

Sources and further reading

AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.

All documentation builds and formats guides →

Read as MarkdownAll guides

Find why a MkDocs page is missing from navigation · gitHtml