New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected error behaviour on name clash #3339
Comments
By the way, if we delete the whole |
Regarding your particular situation, it seems like you wanted to rely on the behavior of assuming that In such case, the correct way to configure it is as follows: site_name: Demo for buggy index.html behaviour
markdown_extensions:
- toc:
permalink: true
exclude_docs: |
/demo/README.md
nav:
- index.md
- Title: demo/index.html |
I recently had an issue with my docs, and although it's something I can and should fix in my docs, I think mkdocs error handling could be improved in this case. When having both a
README.md
andindex.html
in my source, and adding theREADME.md
as one of the nav items, mkdocs correctly warns me that it won't clobber theindex.html
(yay!), but then proceeds to generate broken output in the TOC for that item(boo!), where the link label isNone
, and the link URL points to aREADME.md
file in the output (which doesn't exist). The behaviour of generating broken output and succeeding is quite surprising.I would expect any of the following:
--strict
option but defaulting to this in this case)To reproduce
Use the following config:
Create the following tree of files. Put any valid content in the markdown/html files (or leave them empty):
Once you build this (I've used mkdocs 1.5.2) you'll get a navigation on the top with a link labeled "None", which points to an invalid URL (404).
The text was updated successfully, but these errors were encountered: