Check for Broken Links with Node.js
HTML-код
- Опубликовано: 1 фев 2023
- Let's write a Node.js script that recursively checks links on a site, reports broken links, and lists all the URLs it checked.
Packages:
Linkinator for checking links: www.npmjs.com/package/linkinator
Chalk for color console output: www.npmjs.com/package/chalk - Наука
This is perfect. Just what I was looking for. TY.
Would be awesome if you could have some sort of easy way to fix broken links since they do happen pretty often. Maybe something thats done on the client side where you could just edit the url and it will get fixed right away. And maybe even some sort of fallback links you could set just in case of a broken link.
Can this run in browser ?
This is a Node.js library, so it will need a server to run. However, there are ways to check links on the client, and likely libraries to help.