Check for broken links #6640
-
I haven't yet found the possibility/feature to check for broken links, i.e. for links that worked once but are eventually now broken due to changes in the structure and filenames of markdown files that have not been corrected in all links. Before opening a change request:
Thanks a lot for hints and tips! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Internal links are checked by MkDocs itself. By default it spits out a warning when a link target is not found. If you want the build to fail you can use strict mode. For external links you would need to use a plugin. mkdocs-linkcheck is one such plugin. I have not used it yet but now that I have come across it, might as well give it a spin... |
Beta Was this translation helpful? Give feedback.
I assume that the file is in some
docs/assets/pdfs/filename.pdf
path, so in a filedocs/x/y/filename.md
you'd link to the image via../../assets/pdfs/filename.pdf
or use an absolute link/assets/pdfs/filename.pdf
and adjust thevalidation
mentioned above so absolute links don't produces errors.