You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Blog anchor links in paginated lists should be resolved against blog post url, not current url #10287
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 [xyz](#xyz) appearing above the blog <!-- truncate --> marker (if any), so they get rendered in the blog paginated views. And you expect clicking those anchors to lead to https://docusaurus.io/blog/post#xyz instead of https://docusaurus.io/blog/#xyz, is that correct?
@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.
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 truncated query? Not sure.
changed the title [-]Blog description links broken[/-][+]Blog anchor links above truncate markers should be resolved against blog post url instead of current url[/+]on Aug 9, 2024
changed the title [-]Blog anchor links above truncate markers should be resolved against blog post url instead of current url[/-][+]Blog anchor links in paginated lists should be resolved against blog post url, not current url[/+]on Aug 9, 2024
Activity
OzakIOne commentedon Jul 10, 2024
I'm not sure that I understood, you expect https://docusaurus.io/blog#Docusaurus-3.1 to scroll to Docusaurus 3.1 title ?
slorber commentedon Jul 10, 2024
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
[xyz](#xyz)appearing above the blog<!-- truncate -->marker (if any), so they get rendered in the blog paginated views. And you expect clicking those anchors to lead tohttps://docusaurus.io/blog/post#xyzinstead ofhttps://docusaurus.io/blog/#xyz, is that correct?Josh-Cena commentedon Jul 10, 2024
@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.
slorber commentedon Jul 11, 2024
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)
Josh-Cena commentedon Jul 11, 2024
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
truncatedquery? Not sure.[-]Blog description links broken[/-][+]Blog anchor links above truncate markers should be resolved against blog post url instead of current url[/+][-]Blog anchor links above truncate markers should be resolved against blog post url instead of current url[/-][+]Blog anchor links in paginated lists should be resolved against blog post url, not current url[/+]PranavSharma124 commentedon Nov 23, 2026
Hello, I would like to work on this issue!