Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anchor links within a page do not function correctly #76

Open
TangentFoxy opened this issue Feb 1, 2024 · 2 comments
Open

Anchor links within a page do not function correctly #76

TangentFoxy opened this issue Feb 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@TangentFoxy
Copy link
Contributor

In a note named Note with a heading like ## Subsection, a link formatted as [[Note#Subsection]] creates a link only to the note itself instead of the named section.

While a link like [[#Subsection]] navigates to the correct location within a note, it does not update the address bar of the browser to the correct anchor.

@TangentFoxy TangentFoxy added the bug Something isn't working label Feb 1, 2024
@FeralFlora
Copy link

I would love if this were to work as well. It would make table of contents much more useful in long articles (two-way navigation). And it would be very convenient to be able to link to specific sections of an article.

I use the Automatic Table of Contents plugin to create tables of contents. These links work, but the headings themselves are missing the IDs necessary for navigating back to the ToC from the headings link anchor (since there is none).

@alangrainger
Copy link
Owner

This could be done, the problem is that anchor links normally work using the hash part of the URL. In the case of this plugin, we're using that for the decrypt key.

What could be done is use a query param like &anchor=abc instead, and use Javascript to jump to the right place. Biggest issue is that this would cause the page to reload on each click.

Either that or have clickable heading links only available for unencrypted pages.

alangrainger added a commit that referenced this issue Sep 30, 2024
Fix for #53 #76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants