Skip to content

Relative Links

Say you have a relative link to another page:

<a href="/about/pages">About</a> <a href="/company">Company</a>

How do you know that they work? 🤔 With lychee you can check that!

Here’s how to check all the links in your index.html:

Terminal window
lychee --base index.html

The --base option takes a URL. All relative links are resolved against this URL.

So all relative links will be prefixed with

<a href="">About</a>
<a href="">Company</a>

You can also check the links on a local dev version of your website:

Terminal window
lychee --base http://localhost:8000/ ...

--base also works with a file path:

Terminal window
lychee --base file:///home/user/website/ ...

For more information about the --base option, see lychee --help or the options page.