I'm not good at checking my own code, and I've accidentally pushed broken links and bad HTML on numerous occasions. To solve this, I set up Assertible to automatically check the links and HTML on this blog every time I make a change.
Assertible has test assertions for checking links and HTML validation on a website. These assertions are perfect for this blog; it's a simple static site, heavy on content. I want to make sure that the links stay in tact and the markup is accessible.
The Assertible link checker assertion also checks
<link>, etc tags in addition to
<a> tags - so I get the free
benefit of making sure all of the site's assets are available.
But when you think about, it makes sense to check links immediately
after every change to the site. Links may go bad over time, but by
far the most common occurrence is when I'm pushing something
GitHub Deployments integration actually
works out of the box with GitHub pages, so all I had to do was install
create an environment called
Now, every time I push to the
master branch of this repository,
GitHub deploys the site to GitHub Pages (automatically), sends a
deployment event to Assertible, and Assertible then runs these smoke
tests on the website. In addition, the tests are run hourly, and every
failure will alert me over Slack or email. Cool, right?