Open
Description
I see that in the plugins/deadlinks/deadlinks.py the internal links are explicitly skipped:
for anchor in soup_doc(["a", "object"]):
if "href" not in anchor.attrs:
continue
url = anchor["href"]
# local files and other links are not really intresting
if not url.startswith("http"):
continue # <-- this part skips internal links like somepage#someanchor
# Previous case works also for debugging environment (with SITEURL
# being empty) This case resolves publish environment with all links
# starting with http.
if siteurl and url.startswith(siteurl):
log.info("Url %s skipped because is starts with %s", url, siteurl)
continue
Sometimes (after large refactoring, for example), it would be nice to check that internal links work, too. Basic support could just check the existence of the file. Supporting checking anchors would be even better.
Do you think the scope of the package could allow for including checks for internal links?
Metadata
Assignees
Labels
No labels
Activity