Skip to content

feat: replace markdown-link-check with lychee for link validation#177

Merged
jeremyeder merged 5 commits intomainfrom
feature/lychee-link-checker
Dec 7, 2025
Merged

feat: replace markdown-link-check with lychee for link validation#177
jeremyeder merged 5 commits intomainfrom
feature/lychee-link-checker

Conversation

@jeremyeder
Copy link
Copy Markdown
Contributor

Summary

Replace markdown-link-check with lychee for faster, more reliable link validation in both local development and CI.

Changes

Link Checker Replacement

  • Remove: markdown-link-check (Node.js-based, slower)
  • Add: lychee v0.22.0 (Rust-based, faster, better maintained)

Configuration

  • Created lychee.toml with smart exclusions:
    • Localhost URLs (http://localhost, http://127.0.0.1)
    • File protocol URLs (Jekyll-generated)
    • GitHub issue creation pages
    • Jinja2/Liquid template variables
    • Private/discussion pages

Pre-commit Hook

  • Configured local pre-commit hook using absolute path to lychee binary
  • Added ~/.cargo/bin to PATH for lychee availability
  • Hook runs automatically before each commit on markdown/HTML files

GitHub Actions Workflow

  • Created .github/workflows/link-check.yml
  • Runs on:
    • Push to main and feature/** branches
    • All pull requests
    • Manual trigger via workflow_dispatch

Documentation Fixes

  • Fixed git@ URLs → HTTPS in docs/_data/leaderboard.json
  • Fixed Liquid template warnings in docs/developer-guide.md

Pre-commit Hook Updates

  • Updated all pre-commit hooks to latest versions
  • Removed deprecated markdown-link-check configuration

Benefits

Speed: Lychee is significantly faster than markdown-link-check
Reliability: Better maintained, active development
Dual Enforcement:

  • Local: Fast feedback via pre-commit hook
  • CI: Automatic enforcement via GitHub Actions

Testing

✅ Pre-commit hook tested locally
✅ Link checking verified on all markdown/HTML files
✅ GitHub Actions workflow syntax validated with actionlint

Files Changed

  • .github/workflows/link-check.yml (new) - CI workflow
  • .markdown-link-check.json (removed) - Old config
  • .pre-commit-config.yaml (modified) - Updated hooks
  • lychee.toml (new) - Lychee configuration
  • docs/_data/leaderboard.json (modified) - Fixed git@ URLs
  • docs/developer-guide.md (modified) - Fixed Liquid warnings
  • docs/Gemfile (modified) - Added Ruby 3.4 compatibility gems

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

Loading
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