Skip to content

OG breadcrumbs don't include top (category) level #12208

Description

@ribiza

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Breadcrumbs in the html include the top-level category, but the OG tag doesn't. In the screenshot, you can see that the HTML breadcrumbs read Synchronize documents across multiple nodes (P2P) > Replicator, while the OG tag only includes Replicator.

<script type="application/ld+json" data-rh="true">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Replicator","item":"https://docs.source.network/defradb/p2p/replicator"}]}</script>
Image

Reproducible demo

The screenshot is a preview from unpublished content, but you can see it live in a similar case here.

Steps to reproduce

The sidebar is such defined:

{
      type: 'category',
      label: 'Synchronize documents across multiple nodes (P2P)',
      items: [
        'p2p/index',
        'p2p/pub-sub',
        'p2p/replicator',
      ]
    },

Expected behavior

The OG tag for breadcrumbs should include the base category, as the HTML does.

Actual behavior

Only the last page level is shown.

Your environment

No response

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionstatus: needs triageThis issue has not been triaged by maintainers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions