Skip to content

Commit 07fd2ee

Browse files
committed
Update lychee.toml
1 parent 90e07c2 commit 07fd2ee

File tree

1 file changed

+88
-18
lines changed

1 file changed

+88
-18
lines changed

.github/workflows/lychee.toml

Lines changed: 88 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,29 @@
22

33
# Verbose program output
44
# Accepts log level: "error", "warn", "info", "debug", "trace"
5-
#verbose = "warn"
5+
verbose = "warn"
6+
7+
# Output format
8+
format = "detailed"
9+
10+
# Output display mode
11+
mode = "emoji"
612

713
# Don't show interactive progress bar while checking links.
814
no_progress = false
915

1016
# Path to summary output file.
1117
output = ".github/link_report.md"
1218

19+
# Show host statistics
20+
host_stats = true
21+
22+
# Extract links instead of checking them
23+
dump = true
24+
25+
# Dump inputs instead of doing link extraction / checking
26+
dump_inputs = true
27+
1328
############################# Cache ###############################
1429

1530
# Enable link caching. This can be helpful to avoid checking the same links on
@@ -19,8 +34,14 @@ cache = true
1934
# Discard all cached requests older than this duration.
2035
max_cache_age = "1d"
2136

37+
# A list of status codes that will be ignored from the cache
38+
cache_exclude_status = "500.."
39+
2240
############################# Runtime #############################
2341

42+
# File to read and write cookies
43+
cookie_jar = "cookie-jar"
44+
2445
# Number of threads to utilize.
2546
# Defaults to number of cores available to the system if omitted.
2647
threads = 2
@@ -34,6 +55,18 @@ max_retries = 2
3455
# Maximum number of concurrent link checks.
3556
max_concurrency = 14
3657

58+
# extension applied to files without extension
59+
default_extension = "md"
60+
61+
# GitHub API token
62+
github_token = "secret"
63+
64+
# Resolve directories to index files
65+
index_files = ["index.html"]
66+
67+
# Preprocess input files
68+
preprocess = { command = "preprocess.sh" }
69+
3770
############################# Requests ############################
3871

3972
# User agent to send with each request.
@@ -46,14 +79,21 @@ timeout = 20
4679
retry_wait_time = 2
4780

4881
# Comma-separated list of accepted status codes for valid links.
49-
accept = [200, 429]
82+
# Supported values are:
83+
#
84+
# accept = ["200..=204", "429"]
85+
# accept = "200..=204, 429"
86+
# accept = ["200", "429"]
87+
# accept = "200, 429"
88+
accept = ["200", "429"]
5089

5190
# Proceed for server connections considered insecure (invalid TLS).
5291
insecure = false
5392

5493
# Only test links with the given schemes (e.g. https).
55-
# Omit to check links with any scheme.
56-
scheme = [ "https" ]
94+
# Omit to check links with any other scheme.
95+
# At the moment, we support http, https, file, and mailto.
96+
scheme = ["https"]
5797

5898
# When links are available using HTTPS, treat HTTP links as errors.
5999
require_https = false
@@ -62,45 +102,62 @@ require_https = false
62102
method = "get"
63103

64104
# Custom request headers
65-
headers = []
105+
header = { "accept" = "text/html", "x-custom-header" = "value" }
66106

67107
# Remap URI matching pattern to different URI.
68-
remap = [ "https://example.com http://example.invalid" ]
108+
remap = ["https://example.com http://example.invalid"]
109+
110+
# Fallback extensions to apply when a URL does not specify one.
111+
# This is common in documentation tools that cross-reference files without extensions.
112+
fallback_extensions = ["md", "html"]
69113

70114
# Base URL or website root directory to check relative URLs.
71-
#base = "https://pestphp.com"
115+
#base_url = "https://pestphp.com"
116+
117+
# Enable the checking of fragments in links.
118+
include_fragments = true
72119

73-
# HTTP basic auth support. This will be the username and password passed to the
74-
# authorization HTTP header. See
75-
# <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization>
76-
#basic_auth = ["example.com user:pwd"]
120+
# Minimum accepted TLS Version
121+
min_tls = "TLSv1_3"
77122

78123
############################# Exclusions ##########################
79124

80125
# Skip missing input files (default is to error if they don't exist).
81126
skip_missing = false
82127

128+
# Do not skip hidden directories and files
129+
hidden = true
130+
131+
# Do not skip files that are ignored
132+
no_ignore = true
133+
83134
# Check links inside `<code>` and `<pre>` blocks as well as Markdown code
84135
# blocks.
85136
include_verbatim = false
86137

87138
# Ignore case of paths when matching glob patterns.
88139
glob_ignore_case = false
89140

90-
# Exclude URLs and mail addresses from checking (supports regex).
91-
# receiving forbidden but valid link, receiving timeout but valid link
141+
# Exclude URLs and mail addresses from checking. The values are treated as regular expressions
92142
exclude = [
93143
'https://opensource.org/licenses/MIT',
94144
'https://twitter.com/pestphp',
95145
'^https://laracasts.com/series/(pest-driven-laravel|pest-from-scratch)$',
96146
'^https://www.linkedin.com/learning/.*$',
97147
]
98148

99-
# Exclude these filesystem paths from getting checked.
100-
#exclude_path = ["file/path/to/Ignore", "./other/file/path/to/Ignore"]
149+
# Exclude paths from getting checked. The values are treated as regular expressions
150+
#exclude_path = [
151+
# "\\.txt$", # skip .txt extensions
152+
# "(^|/)test/", # skip directories named "test"
153+
# "[aeiouAEIOU]", # exclude paths containing vowels
154+
#]
155+
156+
# Check the specified file extensions
157+
extensions = ["md"]
101158

102159
# URLs to check (supports regex). Has preference over all excludes.
103-
#include = [ 'gist\.github\.com.*' ]
160+
#include = ['gist\.github\.com.*']
104161

105162
# Exclude all private IPs from checking.
106163
# Equivalent to setting `exclude_private`, `exclude_link_local`, and
@@ -116,6 +173,19 @@ exclude_link_local = false
116173
# Exclude loopback IP address range and localhost from checking.
117174
exclude_loopback = false
118175

119-
# Exclude all mail addresses from checking.
120-
exclude_mail = false
176+
# Check mail addresses
177+
include_mail = false
178+
179+
# Check WikiLinks in Markdown files
180+
include_wikilinks = true
181+
182+
# Only check local files
183+
#offline = true
184+
185+
############################# Hosts #############################
186+
187+
# Maximum simultaneous requests to the same host
188+
host_concurrency = 5
121189

190+
# Minimum interval between requests to the same host
191+
host_request_interval = "50ms"

0 commit comments

Comments
 (0)