This website contains lots of external links. A fact of life is that hyperlinks are subject to change, so they need checking every now and then.
In this how-to article I’ll cover how I did that for this website.
While doing some checking on older articles on my weblog I found a dead link. Checking everything by hand was of course not a good option, so I started looking for a tool. Precisely how I found linklint, I do not recall, but it worked pretty well.
The command I used to check my statically generated website was this:
linklint -textonly -error -warn -xref -out ~/linkreport.txt /@
This command was of course called from the output directory of my static site generator.
From the first run, the most puzzling response was:
not an http link
In a lot of cases this turned out to be the fact that I was using an http: URI, whereas the targets where using https:. Using a combination of the programs find and sed, most of this was easily fixed.
There were also a lot of moved permanently links. Those I generally fixed by hand.
This check also exposed a bug in the pelican 3.5.0 site generator that I used. Tags with spaces in them weren’t handled well. So I either put a dash in between the words or used single word tags.
After a couple of runs, all errors and warnings were fixed.