I tried using the linkchecker tool in AEM 6.5 and it was showing a couple external links that I authored incorrectly but not the internal link that was authored incorrectly. Still with the incorrect external links we can't right away find where it has been used but we can do query I suppose (involving devs)
Please suggest for following thoughts or any other ideas.
- Periodically, in author go through all nodes (their properties) and check for the authored links and hrefs. Get the paths with broken links or a map of broken link --> affected paths and save it. Add to this a component may be where we can input path/path tree , broken link, updated link
- Keep link checker on in author and utilize etc/linkchecker tool to get the broken links and query the broken links. For broken internal links think of something else
If you have nodeJS installed on your machine, there's a tool that I personally use to scrape through an entire website, checking if there are any broken links. If there are any broken links, you should be able to see the highlighted under-tested page, and which link is broken.
@snbaem The linkchecker is mostly used to check the external links and does have performance impacts. Moreover it would just check the link but fixing it, is manual. As per your requirement where you need to find the broken link and need a way to update it as well, I would suggest to use sling rewriter pipeline.
Sling provides a way to rewrite the output/generated markup of a page via a pipeline feature and it is activated in AEM by default (used for the AEM-built in link checker and link rewriting features as well). You would have to create a new transformer-type with all the logic that you need to fix the broken link and add it to the rewrite configuration.