PE-8900 | Publish structured data for protocol docs - #101
Merged
Merged
Conversation
… 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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
r0ohafza
marked this pull request as ready for review
September 17, 2026 20:59
This branch was successfully deployed
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.
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
Organizationnode for Splits; the docs did not link to it.Linear: PE-8900
What
theme.config.tsxnow emits oneapplication/ld+jsongraph per page from the themehead:TechArticleon every page:headlineis the page title,descriptionis the frontmatter description added in PE-8867 | fix(seo): page descriptions, canonical og tags and sitemap cleanup #98,urlis the canonical splits.org URL,publisheris the SplitsOrganization(same@idas the website's node, so the two documents describe one entity),isPartOfis the docsWebSite.dateModifiedis left out on purpose: the Vercel build has no truthful git date and the sitemap droppedlastmodfor the same reason.BreadcrumbListon 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.SoftwareSourceCodeonpages/core/*only, withprogrammingLanguage: SolidityandcodeRepositorypointing at splits-contracts.Nextra calls
headas 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/: oneld+jsonblock each with the expected nodes.tsc,next lintand prettier clean.After deploy:
and the Rich Results Test on
/flow/and/core/swapper/reporting no errors.