Skip to content

feat(seo): add BlogPosting structured data and article social metadata #1149

Description

@KevinVandy

Context

Published TanStack blog posts expose titles, descriptions, authors, publication dates, and images in visible SSR content, but they currently emit no Article or BlogPosting JSON-LD. The shared SEO helper also gives every page og:type=website, including blog posts.

Google documentation: https://developers.google.com/search/docs/appearance/structured-data/article

Relevant route: src/routes/blog.$.tsx

Proposed scope

  • Emit BlogPosting JSON-LD on every published internal blog post.
  • Include accurate values for:
    • headline
    • description
    • image
    • datePublished
    • dateModified when known
    • author as Person or Organization
    • publisher referencing the canonical TanStack Organization node
    • mainEntityOfPage
  • Add optional updated/dateModified frontmatter support so revised posts can distinguish publication and modification dates.
  • Change blog post social metadata to og:type=article.
  • Add article:published_time and article:modified_time when applicable.
  • Reuse the canonical social image transformation already used by the route.

Acceptance criteria

  • BlogPosting JSON-LD is included in the raw SSR response for published internal posts.
  • Draft, future-dated, missing, and error pages do not emit indexable BlogPosting markup.
  • Author names use the same normalization as visible bylines.
  • Author URLs are included only when they identify a real maintainer profile or another stable public identity.
  • Publisher uses the same Organization @id and identity fields as the homepage graph.
  • dateModified is accurate; when no modification date is known, it is omitted or intentionally equals datePublished rather than invented.
  • Image URLs are absolute, crawlable, and representative of the article.
  • og:type is article on post pages and remains website on non-article routes.
  • Automated tests cover single author, multiple authors, missing header image, drafts, and modification dates.
  • Representative posts pass Google Rich Results Test validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions