Skip to content

feat(seo): emit Organization, WebSite, and BreadcrumbList JSON-LD on every docs page#189

Merged
Mlaz-code merged 1 commit into
mainfrom
feat/seo-jsonld-and-breadcrumbs
Apr 17, 2026
Merged

feat(seo): emit Organization, WebSite, and BreadcrumbList JSON-LD on every docs page#189
Mlaz-code merged 1 commit into
mainfrom
feat/seo-jsonld-and-breadcrumbs

Conversation

@Mlaz-code
Copy link
Copy Markdown
Collaborator

Summary

Pre-this-change, every page on docs.sharpapi.io emitted zero structured data (Nextra doesn't ship any by default). sharpapi.io already has rich JSON-LD on every page; the docs were the gap.

Added a server-rendered StructuredData component wired into the layout + MDX page route so every page now emits:

Schema Scope Source
Organization Sitewide Hardcoded — points to sharpapi.io as parent
WebSite Sitewide Hardcoded — docs-scoped
BreadcrumbList Per-page Derived from URL + MDX frontmatter title

Example rendered on /en/api-reference/odds

{
  "@type": "BreadcrumbList",
  "itemListElement": [
    { "position": 1, "name": "Docs",          "item": "https://docs.sharpapi.io/en" },
    { "position": 2, "name": "Api Reference", "item": "https://docs.sharpapi.io/en/api-reference" },
    { "position": 3, "name": "Odds Snapshot", "item": "https://docs.sharpapi.io/en/api-reference/odds" }
  ]
}

The leaf position uses the MDX frontmatter title when available, falling back to a title-cased slug.

Why this matters

Today's URL Inspection showed 25 /en/* docs pages in "Discovered — not indexed". Part of that is the 307→308 redirect migration (already fixed in PR #188); the other part is that Google has no explicit hierarchical signal for how these pages connect. BreadcrumbList JSON-LD gives Google that signal directly, and enables rich breadcrumb snippets in SERPs.

Test plan

  • next build succeeds with all 44 /en/* pages
  • grep -c 'application/ld+json' out/en/quickstart.html → 3
  • Breadcrumb leaf uses frontmatter title (verified on odds.mdx → "Odds Snapshot")
  • After deploy, paste https://docs.sharpapi.io/en/quickstart into Google's Rich Results Test — should show Organization, WebSite, BreadcrumbList

🤖 Generated with Claude Code

…every docs page

Pre-this-change, every page on docs.sharpapi.io emitted zero structured data
(Nextra doesn't ship any by default). Added a server-rendered StructuredData
component wired into the layout + MDX page route so every page now emits:

  - Organization (sitewide, pointing back to sharpapi.io as parent)
  - WebSite (sitewide, docs-scoped)
  - BreadcrumbList (per-page, derived from the URL path and MDX frontmatter
    title — e.g. Docs → Api Reference → Odds Snapshot)

Benefits:
  - Signals hierarchical internal linking explicitly to Google/Bing, which
    helps the 25 /en/* pages currently in "Discovered — not indexed"
  - Enables rich breadcrumb snippets in SERPs
  - Matches the baseline already in place on sharpapi.io

Smoke-verified via `next build`: every /en/* page ships with 3 JSON-LD
blocks and the breadcrumb leaf uses the MDX frontmatter title.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 17, 2026

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

Project Deployment Actions Updated (UTC)
docs.sharpapi.io Ready Ready Preview, Comment Apr 17, 2026 5:38pm

Request Review

@Mlaz-code Mlaz-code merged commit d777954 into main Apr 17, 2026
2 checks passed
@Mlaz-code Mlaz-code deleted the feat/seo-jsonld-and-breadcrumbs branch April 17, 2026 17:44
Mlaz-code added a commit that referenced this pull request May 7, 2026
…every docs page (#189)

Pre-this-change, every page on docs.sharpapi.io emitted zero structured data
(Nextra doesn't ship any by default). Added a server-rendered StructuredData
component wired into the layout + MDX page route so every page now emits:

  - Organization (sitewide, pointing back to sharpapi.io as parent)
  - WebSite (sitewide, docs-scoped)
  - BreadcrumbList (per-page, derived from the URL path and MDX frontmatter
    title — e.g. Docs → Api Reference → Odds Snapshot)

Benefits:
  - Signals hierarchical internal linking explicitly to Google/Bing, which
    helps the 25 /en/* pages currently in "Discovered — not indexed"
  - Enables rich breadcrumb snippets in SERPs
  - Matches the baseline already in place on sharpapi.io

Smoke-verified via `next build`: every /en/* page ships with 3 JSON-LD
blocks and the breadcrumb leaf uses the MDX frontmatter title.
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