Closed arky closed 4 days ago
Good catch! :grimacing:
Maybe we can add a pre-commit hook based on linkrot
and a check in the CI interrupting the build if a broken link is detected.
Stupid and simple pre-commit hook:
#!/bin/sh
exec 1>&2
if [ ! -f bin/htmltest ]; then
echo "htmltest binary not found. Check its documentation https://github.com/wjdp/htmltest"
exit 1
fi
rm -rf public/
npm run build
if ! ./bin/htmltest; then
echo "Some links are broken"
exit 1
fi
exit 0
@U039b Very cool!
I have cleaned up the links that was making htmltest results noisy in this PR https://github.com/PiRogueToolSuite/piroguetoolsuite.github.io/pull/233
@U039b Do you still want to add a pre-hook since we already have a good github linkrot checks?
I added this pre-commit hook on my side but it's not necessary to enforce it. So, we can close this issue.
Add a git pre-commit link checker. Unfortunately hugo doesn't have tests to check for broken links.
The current broken links on v2 branch are as follows: