Skip to content

Commit

Permalink
Add a link checker script
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed May 4, 2024
1 parent 66b6a31 commit 14278dc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/_venv
/site
/.vscode
/.cache
/.cache
.lycheecache
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ For larger changes:
* Access http://127.0.0.1:8000 - any changes to the sources should be
immediately visible in your browser
* Open a PR with your changes or just push them if you have commit rights

### Link Checker

Run `./linkcheck.sh` to check for broken links. This script uses
[lychee](https://github.com/lycheeverse/lychee) and requires Docker to be
installed.
9 changes: 9 additions & 0 deletions linkcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e
DIR="$( cd "$( dirname "$0" )" && pwd )"
cd "${DIR}"

# touch for permissions
touch .lycheecache
docker run --init -it --rm -w /website -v $(pwd):/website lycheeverse/lychee .
7 changes: 7 additions & 0 deletions lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cache = true
max_cache_age = "1d"

scheme = ["https", "http"]
exclude_all_private = true
exclude = [
]

0 comments on commit 14278dc

Please sign in to comment.