-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
mkdocs
validation warnings when referencing sub-project file via absolute link
#6879
Comments
Thanks for reporting. MkDocs 1.6 is not out yet, and I'm not sure when the maintainers of MkDocs will consider it ready for being released. I'm also desperately awaiting the next release and am closely following what's happening, but unfortunately, not much lately. Once it is out, we can evaluate and consider how we can improve support of the projects plugin for this feature, but please understand that we just cannot support unreleased features which might still be subject to change. Additionally, the canonical way to support interlinking between projects is the Closing, but we may reconsider once MkDocs 1.6 is out actually shipping this feature. |
Looks like https://github.com/mkdocs/mkdocs/releases/tag/1.6.0 was released today if this is something to re-consider. Otherwise I'll just wait until |
Yup, I've seen it as well. I don't think this helps, because I believe that MkDocs should and will only validate files inside We still need to find out the specifics of linking between projects. For instance, what happens if you tie together some projects that you also build separately? What happens if you then build a subproject separately that contains a link to another project? I still haven't found the perfect solution for it, but we'd most likely need some kind of fallback that defines what happens when you build them alone. Links could also possibly be just removed, but that doesn't make sense for links in the navigation. There are many case to consider. I also must excuse myself, as I'm currently heavily working on #6307, but we'll see how we can improve the projects plugin with a little more feedback in the near future |
Context
Related third-party discussion/info, relating to an upcoming
mkdocs 1.6
feature. Initially created an issue upstream inmkdocs
repo, but narrowed down the issue to be specific to the projects plugin.relative_to_docs
absolute path validation warning mkdocs/mkdocs#3589Bug description
mkdocs
1.6
(yet to be released), added a new validation mode forabsolute_links
calledrelative_to_docs
that allows using/validating absolute links and replacing them with relative ones. At first glance this seemed to be a good way to link to sub-projects via the projects plugin.However it seems to not work so nicely when you get into it. When linking to a sub-project from a root project, a validation warning is emitted that the target is not found. E.g.
/my_app/thing
linking toprojects/my_app/docs/thing.md
.Based on some of the discussion linked earlier:
Notice the link works, but in order for the warning to not be emitted needs to point at a valid file, of which
/my_app/thing.md
(404),/my_app/thing/thing.md
(404),/my_app/thing/thing.html
(works), all still emit the warning even if the link is valid and works.Related to #5800 (reply in thread), is possible I may just have to wait for this functionality vs using the normal
mkdocs
absolute links. But in either case it would be a nice benefit if this option could make use of themkdocs
validation.Related links
Reproduction
mkdocs-testing.zip
Steps to reproduce
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
mkdocs serve
Notice in the build logs:
Browser
Chrome
Before submitting
The text was updated successfully, but these errors were encountered: