-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Blog anchor links in paginated lists should be resolved against blog post url, not current url #10287
Comments
I'm not sure that I understood, you expect https://docusaurus.io/blog#Docusaurus-3.1 to scroll to Docusaurus 3.1 title ? |
It's hard to understand what it's about indeed, can you please provide a concrete runnable example and screenshots? What I think I understand is that you have anchor tag links |
@slorber Yes, I believe what you said is the expected behavior. I could see a reason for wanting this, and I don't think it's impossible to build—we just need to resolve anchor links to absolute URLs. I'm actually surprised if we are not doing that atm. |
Afaik no we are not doing that atm. It's not just anchor links, but all relative links in general (which we advise to not use, but still an edge case to solve) |
It occurs to me as safe to normalize them, since each page can only map to one slug. But I'm not sure if the Markdown loader can be aware of the current page's mapped URL, or how we should take care of imported Markdown, etc. Maybe we can at least do this in the blog plugin that processes the |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Anchor tags shown on an entry of https://docusaurus.io/blog, doesn't go to the entry page's anchor tag. It goes to the https://docusaurus.io/blog#ANCHOR-TAG.
Reproducible demo
No response
Steps to reproduce
Expected behavior
Expect to go to the entry page's anchor, not to stay on the blog's home page.
Actual behavior
Stays on blog's home page.
Your environment
Self-service
The text was updated successfully, but these errors were encountered: