Closed smokedlinq closed 1 year ago
This is probably not about the plugin, any kind of nav can cause it, both mkdocs
and readthedocs
themes handle nesting poorly. What theme are you using?
Or based on your example, another thing this could be is duplicate of https://github.com/oprypin/mkdocs-literate-nav/issues/14
material, let me test switching back to 4 spaces
4 space navigation produces the same result as 2
First of all, that is really surprising, there's no way that Python-Markdown works with 2 spaces just like it does with 4. But OK.
Could you paste your mkdocs.yml
Also, if I make Level3
a link like [Level3](level3/index.md)
then the link still goes to Level3 Item
but now the menu shows a None
item to the link for Level3
mkdocs.yml
theme:
name: material
language: en
custom_dir: overrides
icon:
edit: material/pencil
view: material/eye
font:
text: Roboto
code: Roboto Mono
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
primary: black
accent: deep orange
toggle:
icon: material/weather-sunny
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: black
accent: deep orange
toggle:
icon: material/weather-night
name: Switch to light mode
logo: logo.png
features:
- navigation.instant
- navigation.indexes
- navigation.tabs
- navigation.tabs.sticky
- navigation.top
- navigation.sections
- content.action.edit
- content.action.view
- content.code.copy
extra:
generator: false
extra_css:
- site.css
extra_javascript:
- site.js
plugins:
- search:
separator: '[\s]+'
lang: en
- redirects
- git-authors:
exclude:
- index.md
- mkdocs-jupyter
- literate-nav:
nav_file: toc.md
tab_length: 2
- minify:
minify_html: true
minify_js: true
minify_css: true
htmlmin_opts:
remove_comments: true
markdown_extensions:
- meta
- admonition
- tables
- toc:
permalink: "🔗"
- attr_list
- def_list
- md_in_html
- mdx_truly_sane_lists
- pymdownx.critic
- pymdownx.caret
- pymdownx.keys
- pymdownx.mark
- pymdownx.tilde
- pymdownx.details
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.pathconverter
- pymdownx.tabbed
- pymdownx.tasklist:
custom_checkbox: true
- navigation.indexes
I'm sure that's what makes it happen
If you want properly behaving navigation indexes, please use https://github.com/oprypin/mkdocs-section-index and not navigation.indexes
. Or if you're not intentionally relying on this setting, just delete it
Thank you for the help so quickly!
Example:
In
level1
directory the nav md contains:What I see when rendered is that
Level3
item ends up being a link toLevel3 Item
andLevel3 Item
doesn't exist.If I make
Level3
a link to the directory like[Level3](level3/)
and move the nav items into that directories md, it generated the nav appropriately.