Skip to content

[UX] uclear how to use --base-url, --root-dir and --remap together to get a built folder checked #1718

@dkarlovi

Description

@dkarlovi

Ref #1606

Let's use this for an example:

mkdir -p public/assets public/download public/test1 public/test2
touch public/assets/app.css public/assets/app.js public/download/something.json public/test1/index.html

and the public/index.html file:

<html>
<head>
    <link rel="stylesheet" href="/sub/dir/another/assets/app.css">
    <link rel="stylesheet" href="https://example.com/sub/dir/another/assets/app.css">
</head>
<body>

<dl>
    <dt>index</dt>
    <dd><a href="/sub/dir/another">/sub/dir/another</a></dd>
    <dd><a href="/sub/dir/another/">/sub/dir/another/</a></dd>

    <dt>file</dt>
    <dd><a href="/sub/dir/another/download/something.json">/sub/dir/another/download/something.json</a></dd>

    <dt>homepage</dt>
    <dd><a href="/sub/dir/another/test1/">/sub/dir/another/test1/</a></dd>
    <dd><a href="/sub/dir/another/test2/">/sub/dir/another/test2/</a></dd>
</dl>

</body>
</html>

When I run Lychee like so

lychee --base-url https://example.com/sub/dir/another --root-dir `pwd`/public public/index.html --offline

I expect these things to happen:

  1. it checks everything (currently it excludes everything)
  2. it finds all the links are valid, except test2 because we didn't create an index.html file in it (I'm assuming I need to remap this?)
  3. it treats URLs prefixed with base-url as offline in this case (because it's equivalent to the others)

Am I missing something or should this already work as is? I'm using just-built master.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions