Commit 5a8b911
authored
ci: add a markdown link + badge checker for README and docs/ (#18)
* ci: add a markdown link + badge checker for README and docs/
The README and docs/ carry many links, shields.io badges, and raw-GitHub
asset URLs. Dead links and dead badges are a common rot in public repos
and there was no guard, so a moved file or renamed asset would silently
404 for visitors.
Add a links workflow that runs lychee over README.md and docs/**/*.md:
- Triggers on PRs that touch a *.md file (plus the checker's own config)
and on a weekly cron, with workflow_dispatch for manual runs.
- Hard 404s fail the job. Flaky or non-fetchable hosts are tolerated via
.lycheeignore: localhost examples, shields.io / hub.docker.com /
star-history badge hosts, and the interactive "ask an assistant" deep
links (chatgpt.com / claude.ai / gemini.google.com) that block bots.
Real content links (github.com, raw.githubusercontent.com, npm, pypi,
the detector sites) stay checked.
- Uses GITHUB_TOKEN so the many github.com links don't hit the anonymous
API rate limit.
Document the workflow and the .lycheeignore escape hatch in CONTRIBUTING.md.
Closes #13
* ci: ignore npmjs.com in the link checker (403s non-browser crawlers)
The first run failed only on https://www.npmjs.com/package/tilion-fortress,
which npm's registry returns 403 Forbidden to for non-browser clients as
bot protection — the package page is not fetchable from CI. Add npmjs.com
to .lycheeignore, the same tolerance already applied to the badge hosts.
PyPI serves crawlers fine and stays checked.1 parent 591beab commit 5a8b911
3 files changed
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
| |||
0 commit comments