You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HtmlProofer has kindly identified that every "Skip to content" link in my site is invalid except the top-level index. You can see this on your own site: right now, the https://squidfunk.github.io/mkdocs-material/customization/ page contains the link:
<a href="../#customization" tabindex="1" class="md-skip">
Skip to content
</a>
and ../#customization is invalid. It should be "#customization"
Expected behavior
All generated links on the page should be valid links.
and that url filter turns "#internal-anchor" into "../#internal-anchor" for a top-level non-index page like Customization. For a page deeper in the docs directory it puts more ../ path components.
Unfortunately the url filter thinks #internal-anchors are absolute from the base, or something. I reported it to mkdocs: mkdocs/mkdocs#1655 . There are no tests for that filter in the mkdocs repo :-(
meanwhile, you don't need to pass that url to that filter as far I can tell.
Thanks for reporting, that's indeed a bug! We should just remove the filter, as you already said. I'm currently on holiday, so expect a fix to land at the end of next week.
PS: that's a great issue. Would love to see more written like this as opposed to "I have error pls fix thx"
Description
HtmlProofer has kindly identified that every "Skip to content" link in my site is invalid except the top-level index. You can see this on your own site: right now, the https://squidfunk.github.io/mkdocs-material/customization/ page contains the link:
and ../#customization is invalid. It should be "#customization"
Expected behavior
All generated links on the page should be valid links.
Actual behavior
In this line of code:
mkdocs-material/material/base.html
Line 105 in fa8d490
it does:
href="{{ (page.toc | first).url | url }}"
and that
url
filter turns "#internal-anchor" into "../#internal-anchor" for a top-level non-index page like Customization. For a page deeper in the docs directory it puts more../
path components.Unfortunately the
url
filter thinks #internal-anchors are absolute from the base, or something. I reported it to mkdocs: mkdocs/mkdocs#1655 . There are no tests for that filter in the mkdocs repo :-(meanwhile, you don't need to pass that url to that filter as far I can tell.
Steps to reproduce the bug
Currently, your gh-pages branch says: "Deployed fa8d490 with MkDocs version: 1.0.4"
Package versions
Project configuration
... it shows up in your own ...
System information
The text was updated successfully, but these errors were encountered: