Skip to content

Linking to root appears to not work. #14

@fidian

Description

@fidian

Here's dir/page.html:

<a href="../">Back to the root</a>

And index.html exists. However, the broken link checker is saying an error.

Error: Link is broken: href: "../", text: "Back to the root", in file: page.html

I believe this is because of how Link.prototype.isBroken() is working with linkPath. After calling linkPath = uri.absoluteTo(unixFilename).path(); the variable is set to an empty string. Immediately afterwards, there's a condition that checks if linkPath === "/" and confirms there's a file at the root, but it appears that this link can not work for me because linkPath is not set to "/".

Setting options.baseURL to "xx" allows this one check to pass, but it seems like a very hacky solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions