Skip to content

feat: add lychee link checker#91

Merged
mroderick merged 1 commit intomainfrom
add-link-checker
Apr 27, 2026
Merged

feat: add lychee link checker#91
mroderick merged 1 commit intomainfrom
add-link-checker

Conversation

@mroderick
Copy link
Copy Markdown
Contributor

Summary

Add automated link checking using lychee to detect broken links in the built VitePress documentation site.

Changes

  • package.json: Add npm run lint:links script to run link checker locally
  • scripts/link-check.sh: Shell script for local link checking using lychee
  • .github/workflows/link-check.yml: GitHub Actions workflow for automated link checking on CI

How it works

The link checker:

  • Runs against the built docs/.vitepress/dist folder (not source files)
  • Excludes local file:// URLs
  • Accepts 200-299 and 403 status codes (npm returns 403 for bots)
  • Runs on push to main, pull requests, and daily schedule
  • Creates GitHub issues for broken link reports

Usage

# Build the docs first
npm run docs:build

# Run link checker locally
npm run lint:links

Notes

  • Uses Homebrew-installed lychee locally, lycheeverse/lychee-action on CI
  • Redirect warnings are expected for some external URLs (e.g., YouTube)

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 27, 2026

Deploying idempot-js with  Cloudflare Pages  Cloudflare Pages

Latest commit: a55e7fd
Status: ✅  Deploy successful!
Preview URL: https://48fe2e98.idempot-js.pages.dev
Branch Preview URL: https://add-link-checker.idempot-js.pages.dev

View logs

@mroderick mroderick marked this pull request as ready for review April 27, 2026 20:19
Add automated link checking using lychee to detect broken links in the
built VitePress documentation site.

Changes:
- Add npm script 'lint:links' to run link checker locally
- Create scripts/link-check.sh for local link checking
- Add .github/workflows/link-check.yml for CI automation
- Remove artefact docs/superpowers directory from past coding sessions
  that was causing 404 errors

The link checker:
- Runs against the built docs/.vitepress/dist folder
- Excludes local file:// URLs
- Accepts 200-299 and 403 status codes
- Runs on push, PR, and daily schedule
- Creates GitHub issues for broken link reports

Security:
- All GitHub Actions pinned to specific commit hashes
- Uses corepack enable for pnpm (repository standard)
- Follows existing workflow patterns from ci.yml

Refs: lycheeverse/lychee-action@v2
@mroderick mroderick merged commit 3aee23a into main Apr 27, 2026
12 checks passed
@mroderick mroderick deleted the add-link-checker branch April 27, 2026 20:24
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.6 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.6 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.6 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant