Skip to content

Blog - Relative links in blog truncated content (list view) are breaking #9731

Open

Description

@slorber

Have you read the Contributing Guidelines on issues?

Prerequisites

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.


Example in production: https://docusaurus.io/blog/tags/search

CleanShot 2024-01-11 at 19 43 10

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)

Activity

  1. added
    bug
    on Jan 11, 2024
  2. changed the title [-]Blog - Relative links in blog truncated excerp a are breaking[/-] [+]Blog - Relative links in blog truncated content (list view) are breaking[/+] on Jan 11, 2024
  3. Mishra-Pravin commented on Jan 12, 2024

    @Mishra-Pravin

    @slorber Sir Can you please describe the bug in detail?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions