This repository was archived by the owner on Apr 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 - run : yarn lint
3131 - run : yarn format
3232 - run : yarn cspell
33+
34+ - name : Check links
35+ - run : |
36+ gem install jekyll bundler
37+ bundler install
38+ yarn links
Original file line number Diff line number Diff line change 22 "name" : " glaredb.github.io" ,
33 "private" : true ,
44 "scripts" : {
5- "check:all" : " yarn lint && yarn format && yarn cspell" ,
5+ "check:all" : " yarn lint && yarn format && yarn cspell && yarn links " ,
66 "cspell" : " cspell lint --config=cspell.json '**/*.md'" ,
77 "dev" : " bundle exec jekyll serve" ,
88 "format" : " prettier --check ." ,
99 "format:fix" : " prettier --write ." ,
1010 "lint" : " markdownlint-cli2 \" **/*.{md,mdx}\" \" !node_modules\" \" !_site\" " ,
1111 "lint:fix" : " markdownlint-cli2-fix \" **/*.{md,mdx}\" \" !node_modules\" \" !_site\" " ,
12- "links" : " lychee -v http://localhost:4000 "
12+ "links" : " ./scripts/check-links.sh "
1313 },
1414 "devDependencies" : {
1515 "cspell" : " ^6.31.1" ,
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Spins up the docs site (on a non-default port) and runs lychee against it to
4+ # check for broken links.
5+
6+ set -e
7+
8+ bundle exec jekyll serve --port 4001 > /dev/null 2>&1 &
9+ pid=$!
10+
11+ attempts=0
12+ until curl --output /dev/null --silent --head --fail http://localhost:4001; do
13+ attempts=$(( attempts+ 1 ))
14+ if [ $attempts -ge 10 ]; then
15+ echo " max attempts exceeded"
16+ exit 1
17+ fi
18+ echo " waiting for server"
19+ sleep 1
20+ done
21+
22+ lychee -v http://localhost:4001
23+
24+ kill $pid
You can’t perform that action at this time.
0 commit comments