Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions src/components/DocsJsonLd.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
const tempoSameAs = [
'https://x.com/tempo',
'https://twitter.com/tempo',
'https://github.com/tempoxyz',
'https://www.linkedin.com/company/tempoxyz',
'https://www.crunchbase.com/organization/tempo-87e4',
]

const tempoKnowsAbout = [
'stablecoin payments',
'cross-border payments',
'global payouts',
'agentic payments',
'machine payments',
'enterprise settlement',
'payment blockchains',
'Layer 1 blockchain',
'stablecoin infrastructure',
]

const description =
'Tempo is a payments-first Layer 1 blockchain incubated by Stripe and Paradigm. Tempo documentation covers stablecoin payments, global payouts, agentic payments, APIs, wallets, and protocol specifications.'

export default function DocsJsonLd(props: { path?: string }) {
const path = props.path || '/docs'
const pathname = path.startsWith('/') ? path : `/${path}`
const url = `https://docs.tempo.xyz${pathname}`
const schema = {
'@context': 'https://schema.org',
'@graph': [
{
'@type': 'Organization',
'@id': 'https://tempo.xyz/#organization',
name: 'Tempo',
url: 'https://tempo.xyz',
description,
sameAs: tempoSameAs,
knowsAbout: tempoKnowsAbout,
},
{
'@type': 'WebSite',
'@id': 'https://docs.tempo.xyz/#website',
name: 'Tempo Docs',
url: 'https://docs.tempo.xyz',
description,
publisher: { '@id': 'https://tempo.xyz/#organization' },
},
{
'@type': 'TechArticle',
'@id': url,
url,
headline: 'Tempo documentation',
description,
isPartOf: { '@id': 'https://docs.tempo.xyz/#website' },
about: { '@id': 'https://tempo.xyz/#organization' },
publisher: { '@id': 'https://tempo.xyz/#organization' },
},
],
}

return (
<script
type="application/ld+json"
// biome-ignore lint/security/noDangerouslySetInnerHtml: static JSON-LD is serialized by React.
dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
/>
)
}
4 changes: 3 additions & 1 deletion src/pages/docs/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { lazy, type PropsWithChildren, Suspense } from 'react'
import DocsHeader from '../../components/DocsHeader'
import DocsJsonLd from '../../components/DocsJsonLd'
import DocsSectionNav from '../../components/DocsSectionNav'
import DocsSidebarDrawer from '../../components/DocsSidebarDrawer'
import { usePageSettled } from '../../lib/pageSettled'
Expand All @@ -28,7 +29,7 @@ if (typeof window !== 'undefined') {

export default function DocsLayout(
props: PropsWithChildren<{
path: string
path?: string
frontmatter?: { interactive?: boolean; mipd?: boolean }
}>,
) {
Expand All @@ -37,6 +38,7 @@ export default function DocsLayout(

return (
<>
<DocsJsonLd path={props.path} />
<DocsHeader />
<DocsSectionNav />
<DocsSidebarDrawer />
Expand Down
Loading