Skip to content

docs: add canonical and title lints - #1139

Closed
brendanjryan wants to merge 1 commit into
mainfrom
seo/canonical-and-title-lints
Closed

brendanjryan wants to merge 1 commit into
mainfrom
seo/canonical-and-title-lints

Conversation

@brendanjryan

Copy link
Copy Markdown
Contributor

Adds SEO lints for page metadata and canonical URLs, and fixes every page that broke them.

What the lints enforce

Frontmatter lint (src/lib/seo-metadata.test.ts, runs in pnpm test, about 10 ms):

  • Every page under src/pages has a title and a description, written as single-line YAML strings (an unquoted value with : fails).
  • The rendered document title (seoTitle, or title through the vocs.config.ts title template) ends with | Tempo Docs and is at most 60 characters. Resources explainers under /docs/resources/guides/ may end with | Tempo. Pages under the OpenAPI mount (/docs/api/*) are checked as Vocs renders them: seoTitle or the bare title, without the template.
  • No two pages render the same title (case-insensitive).
  • Descriptions are 50 to 160 characters.

Post-build check (scripts/check-seo.ts, wired into build:site after finalize-sitemap.ts, also pnpm check:seo):

  • Every sitemap URL and every built page under /, /docs, and /get-started has built HTML and a sitemap entry.
  • Each has exactly one <link rel="canonical"> in its head, equal to https://tempo.xyz/developers + path with no trailing slash, which is also its sitemap URL in production.
  • Each has exactly one <title> that follows the title rules. Generated OpenAPI group pages are listed but not failed (see below).
  • Skips when there is no sitemap outside production, like finalize-sitemap.ts.

Fixes

  • Canonical: docsStructuredDataHead now emits an explicit no-slash canonical for every docs page, not only /. The JSON-LD url uses the same value.
  • Markdown twins: vercel.json sends Link: <https://tempo.xyz/developers/PATH>; rel="canonical" for /PATH.md, /assets/md/PATH.md, and their /developers variants. index.md twins point at https://tempo.xyz/developers. SKILL.md gets no header. The patterns were checked against @vercel/routing-utils' conversion, and vercel-routing.test.ts covers them.
  • Title template: %s ⋅ Tempo Docs / %s ⋅ Tempo become %s | Tempo Docs / %s | Tempo.
  • Counts: 173 rendered titles change (118 seoTitle edits, the rest from the template separator), 29 descriptions shortened or expanded into range, 3 page titles and H1s renamed (Transfer memos, Wallet providers, Stablecoin issuers). The Transfer memos sidebar label and inbound link text follow the rename. No URLs change.
  • docs-seo-metadata.test.ts: the jxom-authored OpenAPI pages (authentication, FAQ, fee payer, indexer, JSON-RPC) now carry an seoTitle because Vocs' OpenAPI layout skips the title template, so their built titles were bare (Authentication). Their title and H1 are unchanged. TIP pages keep their proposal title and numbered H1.
  • AGENTS.md documents the rules under SEO and Social Text.

Notable title changes

Page Old New
/ Tempo Developer Docs: APIs, SDKs & Guides Developer Documentation: APIs, SDKs, and Guides | Tempo Docs
/docs/accounts/access-keys Access Keys with Spending Limits, Scopes, and Expiry on Tempo | Tempo Docs Tempo Access Keys: Spending Limits and Scopes | Tempo Docs
/docs/cli/api tempo api: CLI Reference | Tempo Docs tempo api: Manage API Keys from the CLI | Tempo Docs
/docs/agents Machine Payments | Tempo Docs Tempo MPP: Machine Payments Protocol | Tempo Docs
/docs/quickstart/connection-details Tempo Network Details | Tempo Docs Tempo Mainnet Chain ID and RPC | Tempo Docs
/docs/guide/payments/transfer-memos Payment References and Transfer Memos | Tempo Docs Transfer Memos for Payment References | Tempo Docs
/docs/partners/wallets Embedded & External Wallets | Docs (H1 Wallets) Embedded and External Wallet Providers | Tempo Docs (H1 Wallet providers)
/docs/partners/stablecoins H1 Stablecoins H1 Stablecoin issuers
/docs/protocol/zones Tempo Zones | Docs Tempo Zones Protocol: How Zones Work | Tempo Docs
/docs/api/authentication Authentication Tempo API Authentication: Keys and MPP | Tempo Docs
/docs/api/indexer-api Tempo Indexer API: Query Blockchain Data with SQL Tempo Indexer API: Query Chain Data with SQL | Tempo Docs
/docs/development/configurable-accounts Tempo Configurable Accounts, Owners, Thresholds, and Multisig Signatures | Tempo Docs Tempo Configurable Accounts and Multisig Rules | Tempo Docs
/docs/protocol/tips/tip-1047 Revert code creation and set code at addresses with TIP-20 prefix ⋅ Tempo Docs TIP-1047: Block Code at TIP-20 Prefix Addresses | Tempo Docs
/docs/resources/guides/payment-rails Compare ACH, Wires, Instant Payments, and Stablecoin Rails | Tempo Docs ACH vs. Wires vs. Instant Payments vs. Stablecoins | Tempo

The 43 | Docs titles become | Tempo Docs, and the Resources explainers switch to | Tempo.

Not covered

31 generated OpenAPI group pages (such as /docs/api/activities) still render Vocs' <Group> · Tempo API title, because Vocs' OpenAPI page sets that title directly and has no hook for the site template. The post-build check lists them. Fixing them needs an MDX override per group or a Vocs option.

Verification

  • pnpm check, pnpm check:types, pnpm test (77 files, 1729 tests) pass.
  • VITE_BASE_URL=https://tempo.xyz/developers pnpm build passes, including the new check: "Validated canonical links and titles for 341 built pages in dist/public."
  • The frontmatter lint fails as expected on an injected long title, wrong suffix, unquoted colon, and short description.
  • e2e title expectations in seo-head.test.ts and document-semantics.test.ts are updated to the new titles (not run locally).

@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
tempo-docs Ready Ready Preview Nov 13, 2026 6:46pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T18:43:45.733427Z 17877e5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review found no issues

No high-confidence issues detected in this change.

This branch was successfully deployed

1 active deployment
Preview — 17877e5b Deployed Nov 13, 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