Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a link checker #1863

Open
nuke-web3 opened this issue Jan 15, 2025 · 2 comments
Open

Add a link checker #1863

nuke-web3 opened this issue Jan 15, 2025 · 2 comments

Comments

@nuke-web3
Copy link
Member

nuke-web3 commented Jan 15, 2025

Noticed a few broken links in #1861 and think a CI (and local dev) tool would help a lot in avoiding this in the future.
I quite like https://lychee.cli.rs/ as a fast and fun tool for local checks & CI (with caching enabled) with something like this config:

# saved in ./lychee.toml
cache = true
exclude_all_private = true
exclude_path = ["./node_modules"]
max_cache_age = "10d"
max_redirects = 10
max_retries = 3

exclude = [
    # rate limited / 403 / 503 / whatever
    "https://explorer.celestia-arabica-11.com/",
    "https://arabica.celenium.io/",
    "https://sepolia.arbiscan.io/",
    "https://arbiscan.io/",
    "https://basescan.org/",
    "https://sepolia.basescan.org/",
    "https://celenium.io/",
    "https://mocha.celenium.io",
    "https://mocha-4.celenium.io/",
    "https://celestia-testnet-api.itrocket.net/",
    "https://platform.openai.com/",
    "https://analytics.smartstake.io/",
    # skip any templates used in URLs for `.vitepress/components/*.vue`
    # matches "{.*}" literals in URLs
    '\%7B.*\%7D',
]

(And add .lycheecache to .gitignore ofc)

@nuke-web3
Copy link
Member Author

nuke-web3 commented Jan 15, 2025

Sadly though .vitepress/config.ts has some links that I think lychee cannot check It can actually! lychee .vitepress/config.ts works, TBD how to config explicit path incusions in the config file though...

I started my link fixin' adventure noticing the glossary in the side nav bar was a 404... 🤔 would want to check those too if at all possible.

@jcstein
Copy link
Member

jcstein commented Jan 15, 2025

definitely interested in having this added!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants