nikola icon indicating copy to clipboard operation
nikola copied to clipboard

Navigation-Link to /#some-anchor resolves wrong

Open htgoebel opened this issue 3 years ago • 2 comments

Environment

Nikola v8.2.3

Description:

When defining

NAVIGATION_LINKS = {
    DEFAULT_LANG: (
        ("/", "Home"),
        ("/#some-anchor", "Subsection"),
    ),
}

this link for “Subsection“ is resolved wrong for sibling pages of /index.html.

  • Correct: /index.html: href="#some-anchor"
  • Wrong: /other-page.html: href="#some-anchor" — leading slash is missing
  • Correct: /dir/page.html: href="/#some-anchor" — leading slash is here

I tried different work-arounds, like /./#some-anchor without success.

htgoebel avatar Sep 25 '22 14:09 htgoebel

Hello @htgoebel Please label this task for Hacktoberfest and assign it to me. Thank you.

sudhir512kj avatar Oct 03 '22 05:10 sudhir512kj

@sudhir512kj We do not condone Hacktoberfest due to persistent spam in the previous years and will not add a Hacktoberfest label. We welcome your contribution though!

Kwpolska avatar Oct 03 '22 05:10 Kwpolska