Repository navigation
docs: add canonical and title lints - #1139
Closed
brendanjryan wants to merge 1 commit into
Closed
brendanjryan wants to merge 1 commit into
brendanjryan wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
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 inpnpm test, about 10 ms):src/pageshas atitleand adescription, written as single-line YAML strings (an unquoted value with:fails).seoTitle, ortitlethrough thevocs.config.tstitle template) ends with| Tempo Docsand 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:seoTitleor the bare title, without the template.Post-build check (
scripts/check-seo.ts, wired intobuild:siteafterfinalize-sitemap.ts, alsopnpm check:seo):/,/docs, and/get-startedhas built HTML and a sitemap entry.<link rel="canonical">in its head, equal tohttps://tempo.xyz/developers+ path with no trailing slash, which is also its sitemap URL in production.<title>that follows the title rules. Generated OpenAPI group pages are listed but not failed (see below).finalize-sitemap.ts.Fixes
docsStructuredDataHeadnow emits an explicit no-slash canonical for every docs page, not only/. The JSON-LDurluses the same value.vercel.jsonsendsLink: <https://tempo.xyz/developers/PATH>; rel="canonical"for/PATH.md,/assets/md/PATH.md, and their/developersvariants.index.mdtwins point athttps://tempo.xyz/developers.SKILL.mdgets no header. The patterns were checked against@vercel/routing-utils' conversion, andvercel-routing.test.tscovers them.%s ⋅ Tempo Docs/%s ⋅ Tempobecome%s | Tempo Docs/%s | Tempo.seoTitleedits, 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 anseoTitlebecause 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.Notable title changes
//docs/accounts/access-keys/docs/cli/api/docs/agents/docs/quickstart/connection-details/docs/guide/payments/transfer-memos/docs/partners/wallets/docs/partners/stablecoins/docs/protocol/zones/docs/api/authentication/docs/api/indexer-api/docs/development/configurable-accounts/docs/protocol/tips/tip-1047/docs/resources/guides/payment-railsThe 43
| Docstitles 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 APItitle, 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 buildpasses, including the new check: "Validated canonical links and titles for 341 built pages in dist/public."seo-head.test.tsanddocument-semantics.test.tsare updated to the new titles (not run locally).