mkdocs
validation warnings when referencing sub-project file via absolute link
#6879
Closed
4 tasks done
Labels
change request
Issue requests a new feature or improvement
not feasible
Issue requests something impracticable
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: