Skip to content

docs: blog posts emit two BlogPosting JSON-LD entries #78589

Done

Description

@angelica-moreira

Suggested label: bug

Problem

starlight-blog already emits a BlogPosting (with breadcrumbs) for each post. CustomHead.astro emits a second one, so each post has two BlogPosting entities. Search engines may report the duplicate as an error or pick the wrong one.

How to reproduce

View the source of any blog post and search for "BlogPosting". It appears in two JSON-LD scripts.

Plan

  1. Stop emitting our own BlogPosting in CustomHead.astro.
  2. Add what the plugin entry lacks: the site publisher, and a dateModified that falls back to datePublished.
  3. Add a test helper that collects entities across all JSON-LD scripts on a page. Update schema-jsonld.spec.ts to require exactly one BlogPosting per post.
  4. Note the behaviour in docs/README.md ("Structured data").

Done when

  • Each blog post has exactly one BlogPosting, and it has a publisher and dateModified.
  • The breadcrumbs are unchanged.

Reference fix

Commit: angelica-moreira@d36f005


A working version of this fix is on my fork, in branch angelica/docs-playwright-fixes (all changes vs main). With all 10 commits applied, the full docs Playwright suite passes (239/239). Feel free to reuse the commit linked above, or to implement the plan differently.

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions