Skip to content

PE-8900 | Publish structured data for protocol docs - #101

Merged
r0ohafza merged 1 commit into
mainfrom
seo/protocol-docs-structured-data
Sep 17, 2026
Merged

r0ohafza merged 1 commit into
mainfrom
seo/protocol-docs-structured-data

Conversation

@r0ohafza

Copy link
Copy Markdown
Contributor

Why

The SEO/AEO audit found zero structured data on splits.org/protocol/docs. Search engines and AI answer engines had nothing machine-readable saying what each page is, which site it belongs to, who publishes it, or where it sits in the docs tree. The website repo already publishes an Organization node for Splits; the docs did not link to it.

Linear: PE-8900

What

theme.config.tsx now emits one application/ld+json graph per page from the theme head:

  • TechArticle on every page: headline is the page title, description is the frontmatter description added in PE-8867 | fix(seo): page descriptions, canonical og tags and sitemap cleanup #98, url is the canonical splits.org URL, publisher is the Splits Organization (same @id as the website's node, so the two documents describe one entity), isPartOf is the docs WebSite. dateModified is left out on purpose: the Vercel build has no truthful git date and the sitemap dropped lastmod for the same reason.
  • BreadcrumbList on every page but the index, built from the route: Protocol docs, then the section title from the root _meta.json (Core contracts, SDK, Templates) when the page is nested, then the page.
  • SoftwareSourceCode on pages/core/* only, with programmingLanguage: Solidity and codeRepository pointing at splits-contracts.

Nextra calls head as a plain function while rendering its own Head component, so hooks work there; next/head would drop a nested component, so the script tag is emitted directly. < is escaped in the JSON so a title cannot break out of the script element.

Impact

No Google rich result is expected from these types. This is an entity signal for AI answer engines: each page now states its subject, its parent site and its publisher in the same vocabulary the website home page uses.

Verification

Local production build, prerendered HTML inspected for /, /flow/, /core/, /core/swapper/: one ld+json block each with the expected nodes. tsc, next lint and prettier clean.

After deploy:

curl -sL https://splits.org/protocol/docs/flow/ | grep -c 'ld+json'   # expect 1

and the Rich Results Test on /flow/ and /core/swapper/ reporting no errors.

… JSON-LD

Every page now emits one application/ld+json graph from the theme head:
a TechArticle (title, frontmatter description, canonical URL, Splits as
publisher, the docs WebSite as isPartOf), a BreadcrumbList built from the
route and the root _meta.json section titles, and on core contract pages
a SoftwareSourceCode node pointing at the Solidity repository.
dateModified is omitted because the Vercel build has no truthful git date.
@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
protocol-docs Ready Ready Preview Sep 17, 2026 8:46pm UTC

Request Review

@r0ohafza
r0ohafza marked this pull request as ready for review September 17, 2026 20:59
@r0ohafza r0ohafza changed the title Publish structured data for protocol docs PE-8900 | Publish structured data for protocol docs Sep 17, 2026
@r0ohafza
r0ohafza merged commit ebf84ea into main Sep 17, 2026
1 check passed
@r0ohafza
r0ohafza deleted the seo/protocol-docs-structured-data branch September 17, 2026 21:00

This branch was successfully deployed

1 active deployment
Preview — 400bb1c9 Deployed Sep 17, 2026 by vercel[bot]
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