Skip to content

Commit 14278dc

Browse files
committed
Add a link checker script
1 parent 66b6a31 commit 14278dc

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/_venv
22
/site
33
/.vscode
4-
/.cache
4+
/.cache
5+
.lycheecache

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ For larger changes:
4343
* Access http://127.0.0.1:8000 - any changes to the sources should be
4444
immediately visible in your browser
4545
* Open a PR with your changes or just push them if you have commit rights
46+
47+
### Link Checker
48+
49+
Run `./linkcheck.sh` to check for broken links. This script uses
50+
[lychee](https://github.com/lycheeverse/lychee) and requires Docker to be
51+
installed.

linkcheck.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
set -e
4+
DIR="$( cd "$( dirname "$0" )" && pwd )"
5+
cd "${DIR}"
6+
7+
# touch for permissions
8+
touch .lycheecache
9+
docker run --init -it --rm -w /website -v $(pwd):/website lycheeverse/lychee .

lychee.toml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cache = true
2+
max_cache_age = "1d"
3+
4+
scheme = ["https", "http"]
5+
exclude_all_private = true
6+
exclude = [
7+
]

0 commit comments

Comments
 (0)