02 February, 2020

Check availability of external links in your web pages

When you create your web pages in most case you are using the images, external links, videos which may not be static part of the web page itself, but it's stored externally.

At the time you wrote your shiny page you probably check all these external dependencies to be sure it's working to make your readers happy, because nobody likes to see errors like this:


Now the page is working fine with all external dependencies because I checked it properly - but what about in few months / years / ... ?

Web pages / images  / videos may disappear form the Internet especially when you can not control them and then it's handy form time to time to check your web pages if all the external links are still alive.

There are many tools which you may install to your PC and check the "validity" of your web pages instead of manually clicking the links.

I would like to share my way how I'm periodically checking my documents / pages using the GitHub Actions.

Here is the GitHub Action I wrote for this purpose: My Broken Link Checker

In short you can simply create the git repository in GitHub and store there the file defining which URLs should be checked/verified:




The code above will store the GitHub Action Workflow file into the repository and start checking the "https://google.com" every midnight (UTC).

This is the screencast where you can see it all in action:




This URL checker script is based on muffet and you can set it's parameters by changing the INPUT_CMD_PARAMS variable.

Feel free to look at more details here: https://github.com/ruzickap/action-my-broken-link-checker

I hope this may help you to keep the quality of the web pages by finding the external link errors quickly.

Enjoy :-)

No comments :

Post a comment