oprypin / mkdocs-literate-nav

MkDocs plugin to specify the navigation in Markdown instead of YAML
https://oprypin.github.io/mkdocs-literate-nav
MIT License
73 stars 8 forks source link

Cross-linking in _nav causes MkDocs to flag links as unrecognized #28

Open aw185176 opened 10 months ago

aw185176 commented 10 months ago

When using this plugin with the strictest MkDocs settings available in 1.5, using dir/ references in nav files causes MkDocs to flag those relative links as unrecognized:

WARNING -  Doc file '_nav.md' contains an unrecognized relative link 'dev/', it was left as is. Did you mean 'dev/index.md'?
WARNING -  Doc file '_nav.md' contains an unrecognized relative link 'contrib/', it was left as is. Did you mean
           'contrib/index.md'?
oprypin commented 10 months ago

Very true, yes

oprypin commented 8 months ago

Actually for your use case it seems like the file _nav.md shouldn't be part of the final site. In which case you should use this MkDocs 1.5 feature by adding this to mkdocs.yml:

exclude_docs: |
  _nav.md
aw185176 commented 8 months ago

Thanks, sounds great. Will try that and re-open if it doesn't resolve. 🙇