Skip to content

Support Root-Relative Links (Absolute Links)? #57

@karlhorky

Description

@karlhorky

Hi @wooorm ! 👋

Subject of the feature

What do you think about supporting root-relative links such as in the example below?

[abc](/docs/non-existent/)
[abc](/docs/exists/#non-existent2)

I suppose this could be configured with a configuration option, maybe named like basedir.

Problem

On large sites with a lot of moving files or large directory structures, updating relative links can be a pain.

Root relative links can also avoid any ambiguity that can be caused by using the same path ending and file name between multiple files.

Expected behaviour

It would be nice for these links to also be checked.

Alternatives

gatsby-remark-check-links, but:

  1. It's Gatsby-specific
  2. It runs as a Gatsby plugin and only warns in the console :(

gh-action-check-broken-links, but:

  1. It's wrapped in a GitHub Action
  2. It assumes everything is in a pages directory

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions