Skip to content

Exclude rel="canonical" links from checking #1918

@seehuhn

Description

@seehuhn

Lychee currently checks links in <link rel="canonical"> elements. This causes problems for me, when I use lychee in a pre-deployment check and a new page is about to be added to the site. I would also argue that canonical page links are metadata about the current page, not links that should be validated. The links in question occur in the html header and look like this:

<link rel="canonical" href="https://www.example.com/some/page.html"/>

Suggestion: Links with rel="canonical" should be excluded from checking, similar to how rel="nofollow", rel="preconnect", and rel="dns-prefetch" are already excluded.

If never following rel="canonical" links is too intrusive, maybe following the links could at least be implemented while lychee is in directory traversal mode, if if some command line option is set?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions