docs.openzeppelin.com
docs.openzeppelin.com copied to clipboard
Add check for broken links in CI
As part of the CI checks, ensure that the docsite has no broken links. Check if there is an npm package to handle this.
Alternatively, the following command uses wget to crawl the site, and report the results. Note that it requires the app to be running in a local port, so we need to actually start the dev server, or a python SimpleHTTPServer on the built site (see here for a similar one).
wget -r -l8000 --spider -e robots=off -D localhost http://localhost:8000 -o ./broken-links.log
Other tools, from a quick google search. Remember that the checker does not need to be js-based, as it runs on the netlify build (or another CI) which supports python or ruby.
- https://simpleit.rocks/web/html/how-to-check-local-websites-for-broken-links/
- http://wummel.github.io/linkchecker/
- https://www.npmjs.com/package/broken-link-checker