Skip to content

feat(core): opt-in JSON-LD structured-data validation#138

Merged
i-afaqrashid merged 1 commit into
mainfrom
feat/structured-data-validation
May 29, 2026
Merged

feat(core): opt-in JSON-LD structured-data validation#138
i-afaqrashid merged 1 commit into
mainfrom
feat/structured-data-validation

Conversation

@i-afaqrashid
Copy link
Copy Markdown
Owner

What

Adds checks.routes.structuredData. On 2xx routes it parses every application/ld+json block and emits:

  • SEO-JSONLD-INVALID (warning) when a block is not valid JSON.
  • SEO-JSONLD-MISSING (info) when a route renders no structured data.

Reuses the route-probe body read shared with soft-404 and canonical, so the body is fetched once and only when a body-level check is enabled.

Why

Malformed JSON-LD (often a template-interpolation bug) silently breaks rich results, and structured data is on the 2026 headless-SEO checklist. This completes the route-level SEO surface alongside canonical and OG.

Off by default

Like soft-404 and canonical, it reads response bodies, so it is opt-in. Presence is only info; the actionable signal is malformed JSON.

How verified

  • New scan tests: malformed block -> SEO-JSONLD-INVALID; valid block -> silent; no block -> SEO-JSONLD-MISSING (info).
  • pnpm verify green (209 tests).

Refs improvements/32.

Adds checks.routes.structuredData. On 2xx routes it parses every
application/ld+json block and emits SEO-JSONLD-INVALID (warning) when a
block is not valid JSON, or SEO-JSONLD-MISSING (info) when a route has no
structured data at all.

Reuses the existing route-probe body read shared with soft-404 and
canonical, so the body is fetched once and only when a body-level check
is enabled. Off by default.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cms-lab-site Ready Ready Preview, Comment May 29, 2026 8:56am

@i-afaqrashid i-afaqrashid merged commit bcfd7af into main May 29, 2026
12 checks passed
@i-afaqrashid i-afaqrashid deleted the feat/structured-data-validation branch May 29, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant