Skip to content

Link check failing for PR previews on newly added assets #874

@atteggiani

Description

@atteggiani

Overview

The check-links workflow always fail within a PR, when there are new files added, for example, in the assets folder and referenced in the text as links.

The reason is that the link checker's base directory is set to https://access-hive.org.au/:

base = "https://access-hive.org.au/"

So, for a link to a file referenced as /assets/path/to/the/file.png, the link checker will search for the address https://access-hive.org.au/assets/path/to/the/file.png.
However, https://access-hive.org.au/ is the main website and if the file was added to a PR, it is still not present in the main website.
This means the link-checker will always fail.

Solution

I don't have an easy fix at the moment.
Maybe we should better check lychee's configuration options, and find a way to differentiate absolute URLs from relative ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🪲 bug / mistakeSomething isn't working, is misplaced, or misspelt

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions