Skip to content

Tags: dscho/lychee

Tags

v0.15.1+prettyURLs

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add a way to handle "pretty URLs", i.e. URIs without `.html` extension (

lycheeverse#1422)

In many circumstances (GitHub Pages, Apache configured with MultiViews,
etc), web servers process URIs by appending the `.html` file extension
when no file is found at the path specified by the URI but a `.html`
file corresponding to that path _is_ found.

To allow Lychee to use the fast, offline method of checking such files
locally via the `file://` scheme, let's handle this scenario gracefully
by adding the `--fallback-extensions=html` option.

Note: This new option can take a list of file extensions to use; The
first one for which a corresponding file is found is then used.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>