Registry / devops / mkdocs-literate-nav

mkdocs-literate-nav

JSON →
library0.6.3pypypiunverified

MkDocs plugin to specify the navigation in Markdown instead of YAML. The current version is 0.6.3. It follows an irregular release cadence, often tied to MkDocs compatibility or new features.

pip install mkdocs-literate-nav
INSTALL
IMPORT
SIG · MKDOCS-LITERATE-NA
M
mkdocs-literate-nav
devopspythonv0.6.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

To use the plugin, enable it in your `mkdocs.yml` under the `plugins` section. By default, it looks for `SUMMARY.md` files in your documentation directories to define navigation. The example `SUMMARY.md` shows basic page links, nested sections, and a directory cross-link for 'API Reference' (assuming an `api/` directory with its own `SUMMARY.md` or inferred navigation).

plugins: - literate-nav: nav_file: SUMMARY.md # In your docs/SUMMARY.md file: # * [Home](index.md) # * About # * [Team](about/team.md) # * [History](about/history.md) # * API Reference: api/
Debug
Known issues
breakingThe default value of `nav_file` changed from `index.md` to `SUMMARY.md`.
fix
If upgrading from an older version, rename your root navigation file from `index.md` to `SUMMARY.md`, or explicitly configure `nav_file` in `mkdocs.yml`.
affects: 0.4.0 and later
breakingNavigation files (e.g., `SUMMARY.md`) will no longer be picked up by wildcards when defining navigation.
fix
Ensure `nav_file`s are explicitly referenced or rely on the plugin's default behavior for locating them, rather than expecting wildcard matches to include them.
affects: 0.4.0 and later
gotchaThe plugin will issue a warning when used from the `mkdocs` executable (specifically `v0.6.3` onwards). This is related to the 'ProperDocs' initiative, a community continuation of MkDocs.
fix
If you understand and accept the warning, you can disable it by setting the environment variable `DISABLE_MKDOCS_2_WARNING=true` or `NO_MKDOCS_2_WARNING=true`. Alternatively, consider migrating to ProperDocs if its goals align with your project.
affects: 0.6.3 and later
gotchaRequires specific versions of MkDocs for full compatibility, with recent versions requiring `MkDocs >= 1.6`.
fix
Always ensure your `mkdocs` installation is up-to-date, preferably `mkdocs>=1.6`, to avoid compatibility issues and benefit from recent bug fixes.
affects: All versions
gotchaWhen defining navigation in a Markdown file (e.g., `SUMMARY.md`), the navigation list must be a top-level Markdown list. Links must include a title (e.g., `[Page title](path/to/page.md)`), unless they are wildcards.
fix
Format your navigation Markdown files strictly according to the plugin's syntax, ensuring links have titles and the main navigation is a top-level list. Bare paths for non-wildcard entries will result in errors.
affects: All versions
gotchaIf you maintain an `mkdocs.yml` with a native `nav` section at the root, placing a literate nav file (like `SUMMARY.md`) at the root of your `docs_dir` will cause the native `nav` to be entirely ignored.
fix
To use a 'hybrid nav' approach where MkDocs' native `nav` specifies some sections and `mkdocs-literate-nav` handles subdirectories, ensure there is no literate nav file (e.g., `SUMMARY.md`) at the root of your `docs_dir`. Defer to literate nav only for specific subdirectories using trailing slashes in your `mkdocs.yml` `nav` entries (e.g., `- Subdir: subdir/`).
affects: All versions
Errors
Common errors & fixes
Plugin 'literate-nav' not found
The mkdocs-literate-nav plugin is not installed in your Python environment or is not correctly listed in the `plugins` section of your `mkdocs.yml` file.
fix
First, install the plugin: `pip install mkdocs-literate-nav`. Then, enable it in your `mkdocs.yml`:
```yaml
plugins:
  - search
  - literate-nav
```
bare paths are an error (unless they contain an asterisk)
In your navigation Markdown file (e.g., `SUMMARY.md`), you've used a link without a title, such as `* (path/to/page.md)` or directly `* path/to/page.md`. The plugin requires a title for all non-wildcard links.
fix
Ensure all links in your navigation Markdown file have a title, like `* [Page Title](path/to/page.md)`.
WARNING - A reference to 'some_directory/' is included in the 'nav' configuration, which is not found in the documentation files. (or similar MkDocs `nav` config errors)
When `mkdocs-literate-nav` is enabled, it takes over navigation definition from a Markdown file. If you still have a `nav` section defined in `mkdocs.yml`, it can either be ignored, conflict, or lead to warnings/errors if it's malformed or refers to directories that `literate-nav` expects to handle via a `nav_file`.
fix
If `mkdocs-literate-nav` is managing all your navigation, remove the entire `nav` section from `mkdocs.yml`. If you intend to use a hybrid approach, ensure your `mkdocs.yml` `nav` refers to directories that explicitly contain `literate-nav` files (e.g., `[Section](path/to/dir/)` which would then look for `path/to/dir/SUMMARY.md`).
Exclusion levels of generated files are set incorrectly
This problem often occurs when `mkdocs-literate-nav` is used in conjunction with other plugins, such as `mkdocs-gen-files`, that dynamically create or modify files. The generated files might not have their inclusion levels correctly set, leading to them being unexpectedly excluded from the navigation or the final build.
fix
Ensure that plugins generating files explicitly manage their inclusion levels. For `mkdocs-gen-files`, you might use `mkdocs_gen_files.Nav.build_literate_nav` for programmatic control over the generated navigation structure, ensuring files are properly included.
Upgrade
Version history
0.6.3latest on PyPI · released Mar 16, 2026
Audit
Dependencies
mkdocsrequiredCore dependency as this is an MkDocs plugin. Requires MkDocs >=1.6 for full compatibility.
Agent activity
1 hits · last 30 days
Resources
mkdocs-literate-nav — pip install mkdocs-literate-nav · libregistry