You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--offline Only check local files and block network requests
--offline is misleading. I think a better name would be --include-local or maybe even remove it altogether and only check if --base is provided. - Quoting @mre
As a new user, I tried to use lychee for checking links from local files only. No external requests was expected, I tried to troubleshoot why they were being made and thought --offline would apply to my inputs (which were local files with incorrect path, that lychee tried to request externally).
I was mistaken and --skip-missing (hide and avoid exiting due to network failures technically, but works for local files that don't exist too) was the more appropriate option as it applied to inputs, whereas --offline does not (only links parsed from inputs to check).
I am not sure, but --scheme 'file' may provide equivalent functionality that --offline does? (skipping other URIs rather than blocking?)
Using --scheme 'file' against the example HTML content from this issue, src="assets/img/bg-water.webp" was checked against the local file, while querying the local webserver version at localhost/index.html the resource was skipped. So it seems to match --offline, if a little less obvious.
The opposite behaviour (to check only network requests and ignore local file links) could be --scheme http https, although that will exclude other URIs like data: too.
The text was updated successfully, but these errors were encountered:
As a new user, I tried to use
lychee
for checking links from local files only. No external requests was expected, I tried to troubleshoot why they were being made and thought--offline
would apply to my inputs (which were local files with incorrect path, thatlychee
tried to request externally).I was mistaken and
--skip-missing
(hide and avoid exiting due to network failures technically, but works for local files that don't exist too) was the more appropriate option as it applied to inputs, whereas--offline
does not (only links parsed from inputs to check).I am not sure, but
--scheme 'file'
may provide equivalent functionality that--offline
does? (skipping other URIs rather than blocking?)Using
--scheme 'file'
against the example HTML content from this issue,src="assets/img/bg-water.webp"
was checked against the local file, while querying the local webserver version atlocalhost/index.html
the resource was skipped. So it seems to match--offline
, if a little less obvious.The opposite behaviour (to check only network requests and ignore local file links) could be
--scheme http https
, although that will exclude other URIs likedata:
too.The text was updated successfully, but these errors were encountered: