Git hooks to keep my blog clean
May 12, 2025
As I wrote in the last post I’ve created a little script that spell checks all my blog posts. That was about 3000+ spelling mistakes.
And I then created a similar script to lint the markdown on all blog posts. Another 1250 warnings and errors.
Now that I’ve cleaned that up - I never want to do that again.
No - rather I would like to check for problems every time I make a change. Preferably just before I check stuff into Git.
Turns out - there’s a built-in Git-tool for that.
Let me show you how I put these things together to make a guarded check-in that don’t allow spelling or linting errors to be committed into the repository.