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

Header permalinks do not always work #858

Closed
carlfairclough opened this issue Mar 21, 2020 · 4 comments
Closed

Header permalinks do not always work #858

carlfairclough opened this issue Mar 21, 2020 · 4 comments
Labels
bug 🐛 Something isn't working

Comments

@carlfairclough
Copy link
Contributor

It appears that some permalinks are not working.

To Reproduce
Steps to reproduce the behavior:

  1. Visit https://ethereum.org/wallets/
  2. Click the What is an Ethereum wallet, and which one should I use? permalink icon
  3. See that nothing happens — the url is followed by %3F which is not in the heading id

Expected behavior
The link should go to the heading

@samajammin
Copy link
Member

Mmmm I was a bit worried about this. I suspect the addition of markdown-it-attrs broke these header IDs since the use of bracket notation creates clashes.

We already use bracket notation on markdown headers to set explicit header ids (in order to keep anchor tags consistent across languages. More context on that feature can be found in the related issue.

I wonder the best way to resolve this. @carlfairclough do you feel the markdown-it-attrs package is necessary? Perhaps we could use a symbol other than brackets to generate these markdown header IDs.

@carlfairclough
Copy link
Contributor Author

I'd be keen to keep markdown-it-attrs or roll-our-own version of it, otherwise people won't be able to leverage styles so easily. An alternative could be classy https://github.com/andrey-p/markdown-it-classy.

I'm unsure as to why manually adding IDs to each heading is necessary when it can be done automatically — why do anchor tags need to be consistent across languages, vs being relevant to the content on the page?

@samajammin
Copy link
Member

I think I found a fix - PR coming shortly

@samajammin
Copy link
Member

Re: the need for explicit IDs - does this issue not answer that question? Happy to explain if it doesn't.

carlfairclough added a commit to carlfairclough/ethereum-org-website that referenced this issue Mar 23, 2020
samajammin added a commit that referenced this issue Mar 25, 2020
…dling

updating markdown text handling, isolated text styles [fixes #858 #832]
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

2 participants