- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Links in tags index to tagged pages are incorrect on Windows #3865
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
Comments
Thanks for reporting. I'm not able to reproduce this. I've tested with the following configuration: plugins:
- tags:
tags_file: reference/foo/tags.md
nav:
- Reference:
- Tags: reference/foo/tags.md All links work, no 404s. The URLs are correctly resolved: Please provide a self-contained example that reproduces the issue and append it here as a zip file. Edit: this might be an issue related to how Windows handles paths. I don't have a Windows machine at my disposal, but if you can reproduce the problem, a PR is appreciated. |
Thanks you for the swift reaction Please find the files in the zip file & some test pictures. FYI: Using the tags.md directly inside the docs folder does not give any issue. PS.
|
Okay, I think I have an idea what might be the problem, but I can't test it as I don't have a Windows machine. This issue may have been fixed in fd60d5b. You can install from git and check whether the issue persists:
|
Thanks for the additional investigation. I executed the pip install and retested:
Result: I still have the warnings & the 404 link issue. |
Could you help debug the problem? The tag links are generated at the following location: mkdocs-material/src/plugins/tags/plugin.py Lines 105 to 122 in fd60d5b
Sadly, as mentioned, I don't have a Windows machine at my disposal. I can't reproduce the problem on macOS. |
Add debug prints:
Result
Hopefully it helps. |
Could you print the |
sure. Hope it helps:
|
Another attempt to find the error and fix it in 36d5081. I think the |
installed latest master & tested
Bingo! Works as intended now :-) |
Perfect, so it's indeed the path resolution bug, but I'm glad we could fix it. Thanks for your support! |
Thank you for your swift investigation & solution. Even on a Sunday & holiday (labor day). Dedication I would say! Thank you again. |
Released as part of 8.2.13. |
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
Adding support for tags in a subfolder in my documentation project did cause warnings at mkdocs serve.
Additionally the tag links, from the tags.md inside subfolder, are not working and showing the 404 not found page.
Expected behaviour
Using tags.md in a subfolder should not cause warning as mkdocs serve building time & tag links should work.
Actual behaviour
Using tags.md in a subfolder cause warning & tag links do not work (404 not found)
Steps to reproduce
Package versions
python 3.9.7
mkdocs 1.3.0
version 8.2.12
Configuration
System information
The text was updated successfully, but these errors were encountered: