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
I have read the console error message carefully (if applicable).
Description
Links such as [heading](#headingId) will work on the actual blog post page
But those links won't work on the list views where the blog is truncated with the {/* truncate */} marker.
This is because those relative links are resolved against the current page, and not the blog post permalink.
We should write a Remark plugin that will resolve the blog post links so that we have absolute links in list views, ensuring the links work in both list and detail views.
slorber
changed the title
Blog - Relative links in blog truncated excerp a are breaking
Blog - Relative links in blog truncated content (list view) are breaking
Jan 11, 2024
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
Links such as
[heading](#headingId)
will work on the actual blog post pageBut those links won't work on the list views where the blog is truncated with the
{/* truncate */}
marker.This is because those relative links are resolved against the current page, and not the blog post permalink.
We should write a Remark plugin that will resolve the blog post links so that we have absolute links in list views, ensuring the links work in both list and detail views.
Example in production: https://docusaurus.io/blog/tags/search
This link doesn't work because the heading is not available on this page.
(I'm going to remove this example so it will not be browsable soon)
The text was updated successfully, but these errors were encountered: