-
-
Notifications
You must be signed in to change notification settings - Fork 199
Expand file tree
/
Copy pathlychee.example.toml
More file actions
225 lines (159 loc) · 6.17 KB
/
lychee.example.toml
File metadata and controls
225 lines (159 loc) · 6.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
############################# Display #############################
# Verbose program output
# Accepts log level: "error", "warn", "info", "debug", "trace"
verbose = "info"
# Output format
format = "detailed"
# Output display mode
mode = "emoji"
# Don't show interactive progress bar while checking links.
no_progress = false
# Path to summary output file.
output = ".config.dummy.report.md"
# Show host statistics
host_stats = true
# Extract links instead of checking them
dump = true
# Dump inputs instead of doing link extraction / checking
dump_inputs = true
############################# Cache ###############################
# Enable link caching. This can be helpful to avoid checking the same links on
# multiple runs.
cache = true
# Discard all cached requests older than this duration.
max_cache_age = "2d"
# A list of status codes that will be ignored from the cache
cache_exclude_status = "500.."
############################# Runtime #############################
# File to read and write cookies
cookie_jar = "cookie-jar"
# Number of threads to utilize.
# Defaults to number of cores available to the system if omitted.
threads = 2
# Maximum number of allowed redirects.
max_redirects = 10
# Maximum number of allowed retries before a link is declared dead.
max_retries = 2
# Maximum number of concurrent link checks.
max_concurrency = 14
# extension applied to files without extension
default_extension = "md"
# GitHub API token
github_token = "secret"
# Resolve directories to index files
index_files = ["index.html"]
# Preprocess input files
preprocess = { command = "preprocess.sh" }
############################# Requests ############################
# User agent to send with each request.
user_agent = "curl/7.83. 1"
# Website timeout from connect to response finished.
timeout = 20
# Minimum wait time in seconds between retries of failed requests.
retry_wait_time = 2
# Comma-separated list of accepted status codes for valid links.
# Supported values are:
#
# accept = ["200..=204", "429"]
# accept = "200..=204, 429"
# accept = ["200", "429"]
# accept = "200, 429"
accept = ["200", "429"]
# Proceed for server connections considered insecure (invalid TLS).
insecure = false
# Only test links with the given schemes (e.g. https).
# Omit to check links with any other scheme.
# At the moment, we support http, https, file, and mailto.
scheme = ["https"]
# When links are available using HTTPS, treat HTTP links as errors.
require_https = false
# Request method
method = "get"
# Custom request headers
header = { "accept" = "text/html", "x-custom-header" = "value" }
# Remap URI matching pattern to different URI.
remap = ["https://example.com http://example.invalid"]
# Fallback extensions to apply when a URL does not specify one.
# This is common in documentation tools that cross-reference files without extensions.
fallback_extensions = ["md", "html"]
# Base URL or website root directory to check relative URLs.
base_url = "https://example.com"
# Root path to use when checking absolute local links, must be an absolute path
root_dir = "/dist"
# HTTP basic auth support. This will be the username and password passed to the
# authorization HTTP header. See
# <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization>
basic_auth = ["example.com user:pwd"]
# Enable the checking of fragments in links.
include_fragments = true
# Minimum accepted TLS Version
min_tls = "TLSv1_3"
############################# Exclusions ##########################
# Skip missing input files (default is to error if they don't exist).
skip_missing = false
# Do not skip hidden directories and files
hidden = true
# Do not skip files that are ignored
no_ignore = true
# Check links inside `<code>` and `<pre>` blocks as well as Markdown code
# blocks.
include_verbatim = false
# Ignore case of paths when matching glob patterns.
glob_ignore_case = false
# Exclude URLs and mail addresses from checking. The values are treated as regular expressions
exclude = [
'^https://example\.com/home$', # specific URL
'^https?://example\.com', # match both HTTP and HTTPS
'^https://(www\.)?linkedin\.com', # optional subdomains
'^https://(.*\.)?github(usercontent)?\.(com|io)', # exclude common GitHub URLs
]
# Exclude paths from getting checked. The values are treated as regular expressions
exclude_path = [
"\\.txt$", # skip .txt extensions
"(^|/)test/", # skip directories named "test"
"[aeiouAEIOU]", # exclude paths containing vowels
]
# Check the specified file extensions
extensions = ["md","txt","html"]
# URLs to check (supports regex). Has preference over all excludes.
include = ['gist\.github\.com.*']
# Exclude all private IPs from checking.
# Equivalent to setting `exclude_private`, `exclude_link_local`, and
# `exclude_loopback` to true.
exclude_all_private = false
# Exclude private IP address ranges from checking.
exclude_private = false
# Exclude link-local IP address range from checking.
exclude_link_local = false
# Exclude loopback IP address range and localhost from checking.
exclude_loopback = false
# Check mail addresses
include_mail = true
# Check WikiLinks in Markdown files
include_wikilinks = true
# Only check local files
offline = true
# Accept timed out requests
accept_timeouts = true
############################# Other #############################
# Read input filenames from the given file or stdin ('-')
files_from = "fixtures/empty-file.txt"
# Generate special output instead of performing link checking
generate = "man"
# Use the Wayback Machine as web archive
archive = "wayback"
# Search and suggest link replacements for all broken links
suggest = true
############################# Hosts #############################
# Maximum simultaneous requests to the same host
host_concurrency = 5
# Minimum interval between requests to the same host
host_request_interval = "50ms"
# Customize hosts
[hosts."blog.example.com"]
# Overwrite `host_concurrency` for this host
concurrency = 5
# Overwrite `host_request_interval` for this host
request_interval = "0" # zero disables rate limiting
# Merge global `header` values with the following `headers` for this host
headers = { "A" = "B" }