Configuration strict option not checking broken links #738
Comments
Sorry, this one got lost somewhere along the way. This feature is working for me. We would need debug help - have you tried the most recent version? do you get any errors? what python version and OS are you running? I'll close this now as it is so old and seems to be working, but happy for a new issue to be opened or I'll reopen this one. |
I think I'm seeing a similar issue. I'm getting a warning, but the build is not halted as the doco says it should. I'm using MkDocs 0.15.3, Python 3.5.2. My YML file is: site_name: Documentation
theme_dir: 'fb_theme'
copyright: 'Copyright © 2016'
strict: true
extra:
# REDACTED When I run
I get the warning, but the build continues. |
Hm, it works with |
Erm... ok so, actually, it doesn't work
|
@nguillaumin thanks for the clear report. I can confirm that I get the same behavior and am reopening this issue. BTW, I also noticed that this only applies to |
Ahh, when the |
The different import path in __main__.py allows us to patch load_config. See https://docs.python.org/3/library/unittest.mock.html#where-to-patch Fixes mkdocs#738
Thanks! |
Does the link checking also work for external links? I inserted a broken external link into the docs. I have set the config value |
@waylan a plugin API would be great! |
@fkromer you can check external links with https://github.com/dkhamsing/awesome_bot like this: find . -name '*.md' -exec grep -l http {} + | xargs awesome_bot -t 10 --allow-dupe --allow-redirect |
@davidhrbac Thanks for that hint |
I found https://github.com/magicmatatjahu/milv to work better than awesome_bot, especially for checking internal links and anchors. |
I was testing mkdocs earlier this year and was using "strict: true" in my mkdocs.yml. If I recall correctly, it was working then and building would break if there was a broken link in the .md.
However I am now using v0.14.0 and this config option seems to have no effect on the build - I get no warnings or errors when building regardless of the value of strict.
The text was updated successfully, but these errors were encountered: