|
| 1 | +############################# Display ############################# |
| 2 | + |
| 3 | +# Verbose program output |
| 4 | +verbose = "warn" |
| 5 | + |
| 6 | +# Output format |
| 7 | +format = "markdown" |
| 8 | + |
| 9 | +# Path to report output file |
| 10 | +output = "lychee-report.md" |
| 11 | + |
| 12 | +# Don't show interactive progress bar while checking links. |
| 13 | +no_progress = false |
| 14 | + |
| 15 | +############################# Cache ############################### |
| 16 | + |
| 17 | +# Enable link caching to avoid re-checking identical links across runs. |
| 18 | +cache = true |
| 19 | + |
| 20 | +# Discard cached results older than this duration. |
| 21 | +max_cache_age = "1d" |
| 22 | + |
| 23 | +############################# Runtime ############################# |
| 24 | + |
| 25 | +# Maximum number of allowed redirects. Set to 0 to fail on any redirect — |
| 26 | +# a redirect usually signals moved or reorganised content that should be |
| 27 | +# updated at the source. |
| 28 | +max_redirects = 0 |
| 29 | + |
| 30 | +# Maximum number of allowed retries before a link is declared dead. |
| 31 | +max_retries = 3 |
| 32 | + |
| 33 | +# Minimum wait time in seconds between retries of failed requests. |
| 34 | +retry_wait_time = 2 |
| 35 | + |
| 36 | +# Maximum number of concurrent link checks across all hosts. |
| 37 | +max_concurrency = 8 |
| 38 | + |
| 39 | +############################# Requests ############################ |
| 40 | + |
| 41 | +# Website timeout from connect to response finished (seconds). |
| 42 | +timeout = 20 |
| 43 | + |
| 44 | +# Comma-separated list of accepted status codes for valid links. |
| 45 | +# 429 = Too Many Requests (rate-limited, treat as valid). |
| 46 | +accept = ["200", "429"] |
| 47 | + |
| 48 | +# Proceed for server connections considered insecure (invalid TLS). |
| 49 | +insecure = false |
| 50 | + |
| 51 | +# Only check external links (https/http). Local file:// paths — i.e. all |
| 52 | +# relative and root-relative internal links — are skipped entirely. |
| 53 | +# Internal links are already validated by `mkdocs build --strict`. |
| 54 | +scheme = ["https", "http"] |
| 55 | + |
| 56 | +# Use HEAD requests — much faster than GET since no body is downloaded. |
| 57 | +# Fragment checking requires GET, so include_fragments is disabled; |
| 58 | +# internal anchor links are already validated by `mkdocs build --strict`. |
| 59 | +method = "head" |
| 60 | + |
| 61 | +# Mimic a browser to avoid Cloudflare bot-detection (403) on sites like doc.ibexa.co. |
| 62 | +user_agent = "Mozilla/5.0 (compatible; lychee link checker)" |
| 63 | + |
| 64 | +# Do NOT check anchor fragments — requires full GET downloads for every URL. |
| 65 | +include_fragments = false |
| 66 | + |
| 67 | +# Do NOT check links inside <code> and <pre> blocks. |
| 68 | +include_verbatim = false |
| 69 | + |
| 70 | +############################# Exclusions ########################## |
| 71 | + |
| 72 | +# Exclude URLs from checking (treated as regular expressions). |
| 73 | +exclude = [ |
| 74 | + # LinkedIn blocks automated requests |
| 75 | + "^https?://(www\\.)?linkedin\\.com", |
| 76 | + # Localhost and loopback addresses |
| 77 | + "^https?://localhost", |
| 78 | + "^https?://127\\.0\\.0\\.1", |
| 79 | + # Placeholder/example domains |
| 80 | + "^https?://example\\.com", |
| 81 | + # GitHub login/auth pages often rate-limit or redirect bots |
| 82 | + "^https?://github\\.com/login", |
| 83 | +] |
| 84 | + |
| 85 | +# Exclude these input paths from being scanned. |
| 86 | +exclude_path = [ |
| 87 | + # Search index, assets and sitemap contain no meaningful external links |
| 88 | + "site/search", |
| 89 | + "site/assets", |
| 90 | + "site/404.html", |
| 91 | + "site/sitemap.xml", |
| 92 | + "site/robots.txt", |
| 93 | +] |
| 94 | + |
| 95 | +# Check the specified file extensions |
| 96 | +extensions = ["html"] |
| 97 | + |
| 98 | +# Exclude all private IPs from checking. |
| 99 | +exclude_all_private = true |
| 100 | + |
| 101 | +############################# Local files ######################### |
| 102 | + |
| 103 | +# Required to resolve root-relative links (e.g. href="/") found in every page. |
| 104 | +# Combined with scheme = ["https", "http"], the resulting file:// paths are |
| 105 | +# silently skipped — no HTTP check, no error. |
| 106 | +root_dir = "site" |
| 107 | + |
| 108 | +############################# Hosts ############################### |
| 109 | + |
| 110 | +# Global limit: at most 2 simultaneous requests to any single host. |
| 111 | +host_concurrency = 2 |
| 112 | + |
| 113 | +# Global minimum interval between requests to the same host. |
| 114 | +host_request_interval = "500ms" |
| 115 | + |
| 116 | +# Stricter throttling for Cloudflare-protected hosts. |
| 117 | +# [hosts] tables must come last in the file (TOML section scoping). |
| 118 | +[hosts."doc.ibexa.co"] |
| 119 | +concurrency = 1 |
| 120 | +request_interval = "1s" |
0 commit comments