Skip to content

url filter gives the wrong path to local anchor links #1655

Description

@jessitron

When passed "#internal-anchor" on a page other than the top-level index, the url filter returns a relative path to the top-level index.

Like, if I have a page about.md and the page.url is about/; if I pass "#internal-anchor" to the url filter, I get ../#internal-anchor.

The url filter should not modify those URLs that are internal to the current page.

(I suffer from this problem when using the material theme; in 3.0.4, in the "Skip to content" link, it passes a toc item's url to the url filter, which breaks it on every page except the top-level index. HTMLProofer complains about the broken link.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions