From 477a5d0ef5985825887f11f67ef1f6b3ae89b640 Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Wed, 20 Mar 2024 15:54:18 +1100 Subject: [PATCH] Add linkcheck script --- README.md | 5 +++-- bin/linkcheck | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100755 bin/linkcheck diff --git a/README.md b/README.md index 3cc13799..dc226817 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,9 @@ To deploy, run `bin/deploy`. This requires SSH access to `hickory.sfconservancy. ## Link checking -To check for broken links, log on to `hickory.sfconservancy.org` and run -`linkchecker https://sfconservancy.org/`. +To check for broken links in production, run: + + bin/linkcheck Note that the Apache configuration has a significant number of aliases and redirects for historic URL changes which means that linkchecker may not run diff --git a/bin/linkcheck b/bin/linkcheck new file mode 100755 index 00000000..d7cfca55 --- /dev/null +++ b/bin/linkcheck @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +set -e # Abort on failure +set -x + +# Run the check from the web-server itself to avoid network delays. +ssh debian@hickory.sfconservancy.org "linkchecker https://sfconservancy.org/"