# lychee link-checker config — https://github.com/lycheeverse/lychee
# Applies to the docs link check (CI: .github/workflows/docs.yml).

# Don't descend into the gitignored build dir's packaged doc copies.
exclude_path = ["target"]

# Cache results so re-runs don't re-hit every URL.
cache = true
max_cache_age = "2d"

# Be resilient to transient network / rate-limit blips rather than flaky-failing.
max_retries = 3
retry_wait_time = 2
# GitHub rate-limits unauthenticated link checks; treat 429 as OK.
accept = ["200..=299", "429"]

# Illustrative hosts that appear in the docs and are not meant to resolve.
exclude = [
  "^https?://([^/]+\\.)?example\\.(com|org)",
  "^https?://127\\.0\\.0\\.1",
  "^https?://localhost",
  # Self-referential badges — these 404 until the crate is published / the repo
  # is pushed, then resolve. Excluded so the link check doesn't fail pre-publish.
  "^https://crates\\.io/crates/fso-ghr-stats",
  "^https://docs\\.rs/fso-ghr-stats",
  "^https://github\\.com/fluminis-scientiae-oraculum/ghr-stats/actions",
]
