feat(seo): emit Organization, WebSite, and BreadcrumbList JSON-LD on every docs page#189
Merged
Merged
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
StructuredDatacomponent wired into the layout + MDX page route so every page now emits:OrganizationWebSiteBreadcrumbListExample 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.BreadcrumbListJSON-LD gives Google that signal directly, and enables rich breadcrumb snippets in SERPs.Test plan
next buildsucceeds with all 44/en/*pagesgrep -c 'application/ld+json' out/en/quickstart.html→ 3https://docs.sharpapi.io/en/quickstartinto Google's Rich Results Test — should show Organization, WebSite, BreadcrumbList🤖 Generated with Claude Code