Skip to content

feat(www): Algolia DocSearch for the site search - #7772

Closed
KATT wants to merge 3 commits into
mainfrom
cursor/www-algolia-search-28db
Closed

KATT wants to merge 3 commits into
mainfrom
cursor/www-algolia-search-28db

Conversation

@KATT

@KATT KATT commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Based on main, now that the new site (#7771) has merged. This PR's diff is only the search change.

Why

  • #7771 shipped the new site with v12's fuzzy search, a local index of the pages.
  • trpc.io searches with Algolia DocSearch today. This brings that back on the new site, with the same Algolia app, index and key.

What

  • The navbar search button and ⌘K open Algolia's DocSearch modal instead of the local search dialog.
    • App BTGPSR4MOE, index trpc, DocSearch's public search-only key: main's current config (www/src/site.ts).
    • The modal loads lazily on first open, so pages don't ship DocSearch's JavaScript.
    • Results open within the site through the router. Hit URLs are rewritten to the current host, so a preview's search stays on the preview.
    • Hits on v10 and v9 pages open at the same /docs/v10/... and /docs/v9/... paths as in the index, since the new site serves them at trpc.io's paths.
  • Search finds the version you're reading, as trpc.io's contextual search does (step 1 of the feasibility research below).
    • docHead (www/src/components/doc-page.tsx) emits <meta name="docsearch:version"> (current, 10.x or 9.x) and <meta name="docsearch:language" content="en">. Algolia's crawler copies these onto each record, so the filter keeps working once it indexes the new site.
    • The modal sends filters: 'NOT version:"10.x" AND NOT version:"9.x"', leaving out the other versions' records, rather than requiring version:current. Off the docs, such as on the blog, it searches v11.
    • Records without a version still match, so search keeps working when a crawl leaves the facet off. It also drops any hit whose URL belongs to another version.
    • Requiring the version, as the first version of this PR did, found nothing after the Nov 1 recrawl. trpc.io doesn't emit docsearch:version until this PR merges, so none of the 16,899 new records has a version.
    • A page title's hit links to the page, not to the layout's #content anchor that the crawler gives it.
    • This also removes the duplicate hits, such as "Awesome tRPC Collection" three times, which were the v9, v10 and v11 copies.
  • The modal's layout and colours:
    • It imports DocSearch's _variables.css, where its sizes live: modal width and height, spacing, and hit and footer heights. Without it the modal spans the window and its rows have no padding.
    • The site's colour overrides are set on .DocSearch-Container, not :root, so the lazily loaded _variables.css doesn't override them.
    • It also sets --docsearch-background-color, --docsearch-subtle-color and --docsearch-soft-primary-color. DocSearch's dark values only apply under html[data-theme=dark], which this site doesn't set.
    • The result is a centered 800×588 panel in the site's colours, light and dark, and fullscreen on phones.
  • The /search page keeps the local index.
  • @docsearch/react and @docsearch/css are added at 4.7.0, main's version.

DocSearch, light

DocSearch, dark

DocSearch on a phone

Needs setup: the crawler config

The crawler's config is still Docusaurus's. On the new site, every record gets lvl0 "Documentation" (so DocSearch shows at most five hits, all under one group), no version, and some extra text: "On this page", callout labels and partners.

In dashboard.algolia.com → Data sources → Crawler → trpc → Editor, replace the config with this one. Keep the existing apiKey line and the initialIndexSettings block if the current config has one. Check a few URLs in the URL Tester, such as /docs/client/react/useQuery, /docs/v10/server/context and /blog/announcing-trpc-11, then save and start a crawl.

Crawler config
new Crawler({
  appId: 'BTGPSR4MOE',
  apiKey: 'KEEP_THE_EXISTING_VALUE',
  rateLimit: 8,
  maxDepth: 10,
  startUrls: ['https://trpc.io/docs', 'https://trpc.io/blog'],
  sitemaps: ['https://trpc.io/sitemap.xml'],
  ignoreCanonicalTo: true,
  discoveryPatterns: ['https://trpc.io/**'],
  exclusionPatterns: ['https://trpc.io/**/*.md'],
  actions: [
    {
      indexName: 'trpc',
      pathsToMatch: ['https://trpc.io/docs/**', 'https://trpc.io/blog/**'],
      recordExtractor: ({ $, helpers, url }) => {
        const { pathname } = url;
        // The site's search shows only the reader's docs version.
        const version = /^\/docs\/v10(\/|$)/.test(pathname)
          ? '10.x'
          : /^\/docs\/v9(\/|$)/.test(pathname)
            ? '9.x'
            : 'current';

        // lvl0: the page's sections, from its JSON-LD breadcrumbs,
        // without the site ("tRPC") and the page itself.
        let sections = [];
        $('script[type="application/ld+json"]').each((_, el) => {
          try {
            const data = JSON.parse($(el).text());
            for (const item of [data].flat().flatMap((d) => d['@graph'] ?? [d])) {
              if (item['@type'] === 'BreadcrumbList') {
                sections = item.itemListElement.map((i) => i.name).slice(1, -1);
              }
            }
          } catch {}
        });
        const lvl0 =
          sections.join(' / ') ||
          (pathname.startsWith('/blog') ? 'Blog' : 'Documentation');

        // Not the page's text: "On this page", callout labels, partners.
        $('article nav, article details, section[aria-label="Partners"], .callout-title').remove();
        // Otherwise a page title's record links to the layout's #content.
        $('#content').removeAttr('id');

        return helpers.docsearch({
          recordProps: {
            lvl0: { selectors: '', defaultValue: lvl0 },
            lvl1: ['article header h1', 'article h1'],
            lvl2: 'article .prose h2',
            lvl3: 'article .prose h3',
            lvl4: 'article .prose h4',
            lvl5: 'article .prose h5, article .prose td:first-child',
            lvl6: 'article .prose h6',
            content:
              'article .prose p, article .prose li, article .prose td:last-child',
            version: { defaultValue: [version] },
            language: { defaultValue: ['en'] },
          },
          indexHeadings: true,
          aggregateContent: true,
          recordVersion: 'v3',
        });
      },
    },
  ],
});
  • lvl0 comes from each page's JSON-LD breadcrumbs, for example "Client Usage / React Query Integration (Classic)" or "API Reference / @trpc/server / index", "Blog" on the blog, and "Documentation" when there are none.
  • version comes from the URL: /docs/v10/... is 10.x, /docs/v9/... is 9.x, and everything else is current. So the filter works after a crawl even before this PR merges.
  • It adds the blog, which DocSearch allows for technical blogs.
  • I ran this extractor with Cheerio against live trpc.io pages for v11, v10, v9, API reference and blog. Each got the expected lvl0, title, headings and text, and its version.

Links

  • Docs: Introduction: open search with the navbar button or ⌘K and search for "useQuery". The hits are v11 pages only; open one.
  • v10 docs: Introduction: the same search shows only v10 pages, and a hit opens at /docs/v10/....
  • Blog: search shows v11 pages.

Alternatives considered

  • Keeping only v12's local fuzzy search. It needs no third party or crawler, but it only matches titles and headings in the bundled index; Algolia also searches page text. The site on main already has the fuzzy search, so this PR can merge or not on its own.

Testing

  • pnpm typecheck-www, the www tests (257), pnpm lint, pnpm oxfmt --check . and pnpm manypkg check pass, and pnpm install --frozen-lockfile installs on main plus this PR.
  • In a local build of this branch (pnpm --filter www build), checked in Chrome:
    • The meta tags are on v11, v10, v9 and API reference pages.
    • The modal leaves out v10 and v9 records on v11 pages and the blog, and v11 and v9 records on v10 pages.
    • It's 800×588 at 1280px wide, light and dark, and fullscreen at 390px.
    • Clicking a hit, and pressing Enter on one, opens its page with the modal closed, including v10 pages.
  • After the Nov 1 recrawl, on the Vercel preview in headless Chrome: "useQuery" returns v11 hits on /docs and v10 hits on /docs/v10/server/context. The Algolia requests return 200, with no console errors.

Feasibility research

Verdict: go, with one fix in this PR and one crawler update after launch. The existing DocSearch app, index and crawler keep working with the new site. This PR should filter results by docs version before it merges. Once the new site is live, the crawler's selectors need a small update in Algolia's dashboard.

How DocSearch fits the new site

  • The new site is TanStack Start and Vite, not Docusaurus. DocSearch plugs in through @docsearch/react's DocSearchModal, as this PR does, and nothing else from docusaurus-theme-search-algolia is needed.
  • What's lost is contextual search. Docusaurus defaults contextualSearch to true, and main's commented-out line doesn't turn it off. So trpc.io sends facetFilters: ['language:en', ['docusaurus_tag:default', 'docusaurus_tag:docs-default-<version>']] and only shows the version you're reading.
  • This PR sends no filter. Against today's index, 14 of 20 common queries (useQuery, middleware, useMutation, authorization, context, …) return a v9 or v10 page first, and 49 of their 100 top-5 hits are v9 or v10.
  • The version, language and docusaurus_tag facets come from Docusaurus's docsearch:* meta tags, which the crawler's DocSearch helper copies onto every record; the template doesn't select them itself. The new site emits none of them, so the facets also disappear once the crawler indexes the new site.

Does the crawler keep working?

  • Today's index has 13,474 records over 570 URLs, all under /docs: about 90 v11 guide pages, 369 API reference pages, 72 v10 pages and 39 v9 pages. It has no blog posts. It still has headings removed from the docs on Oct 31, so the crawler is running on a schedule; its last run was before those changes.
  • The new HTML works with the Docusaurus template's selectors. I checked them against the feat(www): port the v12 website onto main, with v11 content #7771 preview on docs, v10, API reference and blog pages. header h1, article h1 and article h2–h5 match the same headings as on trpc.io. Three things differ:
    • The page's top-level category (lvl0) is read from Docusaurus classes (.menu__link--active, .breadcrumbs__link), which the new site doesn't have. Every record would get the template's fallback, "Documentation". The new site's breadcrumb, nav[aria-label="Breadcrumb"] li, gives the same category.
    • The page-text selector, article p, article li, also picks up the "On this page" list, callout titles ("Note", "Tip") and the Partners section. The doc body itself is article .prose.
    • Nothing else blocks crawling: <html lang="en">, sitemap.xml (574 URLs) and robots.txt are in place, and only previews are noindex, not production.
  • We control the crawler config. It's a DocSearch-program crawler in our own Algolia app (BTGPSR4MOE). Whoever has access to that Algolia account can edit it in dashboard.algolia.com under Data sources → Crawler → Editor, check pages with its URL Tester, and start a crawl, without asking Algolia.
  • The config isn't in the repo, so I couldn't read the current one. The index settings, which the public key can read, match Algolia's Docusaurus template.

Do the URLs stay compatible?

  • Yes. All 570 indexed URLs load a real page on the feat(www): port the v12 website onto main, with v11 content #7771 preview: 424 directly and 146 through redirects (trailing slashes, /docs/test, and /docs/v10/* and /docs/v9/*, which the site has since moved back to trpc.io's paths, so they now load directly). Unknown paths return 404 on the preview, so none of these are soft 404s.
  • 2,771 of the 2,779 heading anchors in the index exist on the new pages. The 8 missing ones are also gone from trpc.io; they're stale records, such as headings removed from /docs/skills.

Compared with the local fuzzy search

Local fuzzy search (on main) Algolia DocSearch (this PR)
What it finds Titles, headings and descriptions of the current version's pages Titles, headings and page text, with typo tolerance
JavaScript Adds about 7 kB gzipped to the main chunk 109 kB JS and 5 kB CSS gzipped, downloaded the first time search opens
Cost None Free under the DocSearch program (up to 5M records and 50M searches a month), as long as "Search by Algolia" stays visible
Maintenance Built from the content, so it can't drift The crawler config lives in Algolia's dashboard, so markup changes can quietly degrade the index

Building our own index

  • Not possible on the DocSearch plan. Algolia's support says DocSearch apps only get records from the crawler, not through the API.
  • Pushing records at build time would need a separate Algolia app on a paid plan, since 13.5k records and trpc.io's search traffic are past the free tier.
  • If the goal is to avoid a crawler, a cheaper route is to build the site's local index with page text at build time and load it lazily, without Algolia.

Steps

  1. In this PR, before merge, filter by version:
    • In docHead (www/src/components/doc-page.tsx), emit <meta name="docsearch:version" content="current"> (10.x and 9.x for the older docs) and <meta name="docsearch:language" content="en">.
    • Pass indices={[{ name: 'trpc', searchParameters: { filters: 'NOT version:"<other>" AND …' } }]} to DocSearchModal, using v11 outside the docs. Excluding the other versions, rather than requiring this one, keeps search working when a crawl leaves records without a version.
  2. Now that the new site is live, update the crawler editor with the config in "Needs setup" above.
    • The merged site has no nav[aria-label="Breadcrumb"], so the config reads lvl0 from the JSON-LD breadcrumbs instead.
    • Until this update, search keeps working; scheduled crawls only label every result "Documentation" and add some noise.
  3. Optional:
    • Add https://trpc.io/blog/** to the crawler's paths; DocSearch allows technical blogs.
    • Keep a copy of the crawler config in the repo so markup changes get reviewed against it.
    • Preload the DocSearch chunk when the search button is hovered or focused.
    • @docsearch/react 5.2.0 is out. 4.7.0 matches main and is fine for now.
Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@KATT
KATT requested review from a team as code owners November 1, 2026 19:19
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
og-image Error Error Nov 2, 2026 11:36am UTC
www Ready Ready Preview Nov 2, 2026 11:36am UTC
6 Skipped Deployments
Project Deployment Actions Updated
trpc-v12 Ignored Ignored Preview Nov 2, 2026 11:36am UTC
examples-todomvc Skipped Skipped Nov 2, 2026 11:36am UTC
next-prisma-starter Skipped Skipped Nov 2, 2026 11:36am UTC
next-prisma-websockets-starter Skipped Skipped Nov 2, 2026 11:36am UTC
tanstack-start-sse-chat Skipped Skipped Nov 2, 2026 11:36am UTC
trpc-next-app-dir Skipped Skipped Nov 2, 2026 11:36am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pkg-pr-new

pkg-pr-new Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@trpc/client

npm i https://pkg.pr.new/@trpc/client@7772

@trpc/next

npm i https://pkg.pr.new/@trpc/next@7772

@trpc/openapi

npm i https://pkg.pr.new/@trpc/openapi@7772

@trpc/react-query

npm i https://pkg.pr.new/@trpc/react-query@7772

@trpc/server

npm i https://pkg.pr.new/@trpc/server@7772

@trpc/tanstack-react-query

npm i https://pkg.pr.new/@trpc/tanstack-react-query@7772

@trpc/upgrade

npm i https://pkg.pr.new/@trpc/upgrade@7772

commit: 731f076

@cursor
cursor Bot force-pushed the cursor/www-algolia-search-28db branch from 64734b3 to 722e0f7 Compare November 1, 2026 19:28
@vercel
vercel Bot temporarily deployed to Preview – trpc-next-app-dir November 1, 2026 19:28 Inactive
@vercel
vercel Bot temporarily deployed to Preview – og-image November 1, 2026 19:28 Inactive
@vercel
vercel Bot temporarily deployed to Preview – next-prisma-starter November 1, 2026 19:28 Inactive
@vercel
vercel Bot temporarily deployed to Preview – examples-todomvc November 1, 2026 19:28 Inactive
@cursor
cursor Bot force-pushed the cursor/www-algolia-search-28db branch from 722e0f7 to 029f3ef Compare November 1, 2026 20:08
@vercel
vercel Bot temporarily deployed to Preview – examples-todomvc November 1, 2026 20:08 Inactive
@vercel
vercel Bot temporarily deployed to Preview – og-image November 1, 2026 20:08 Inactive
@vercel
vercel Bot temporarily deployed to Preview – next-prisma-starter November 1, 2026 20:08 Inactive
@vercel
vercel Bot temporarily deployed to Preview – trpc-next-app-dir November 1, 2026 20:08 Inactive
@cursor
cursor Bot force-pushed the cursor/www-algolia-search-28db branch from 029f3ef to 7054954 Compare November 1, 2026 20:19
@vercel
vercel Bot temporarily deployed to Preview – trpc-next-app-dir November 1, 2026 20:19 Inactive
@vercel
vercel Bot temporarily deployed to Preview – examples-todomvc November 1, 2026 20:19 Inactive
@vercel
vercel Bot temporarily deployed to Preview – og-image November 1, 2026 20:19 Inactive
@vercel
vercel Bot temporarily deployed to Preview – next-prisma-starter November 1, 2026 20:19 Inactive
@cursor
cursor Bot force-pushed the cursor/www-algolia-search-28db branch from 7054954 to 247f6a8 Compare November 1, 2026 20:22
@vercel
vercel Bot temporarily deployed to Preview – next-prisma-starter November 1, 2026 20:22 Inactive
@vercel
vercel Bot temporarily deployed to Preview – og-image November 1, 2026 20:22 Inactive
@vercel
vercel Bot temporarily deployed to Preview – examples-todomvc November 1, 2026 20:22 Inactive
@vercel
vercel Bot temporarily deployed to Preview – trpc-next-app-dir November 1, 2026 20:22 Inactive
@cursor
cursor Bot force-pushed the cursor/www-algolia-search-28db branch from 247f6a8 to 98e9492 Compare November 1, 2026 20:23
@vercel
vercel Bot temporarily deployed to Preview – next-prisma-starter November 1, 2026 22:48 Inactive
@vercel
vercel Bot temporarily deployed to Preview – trpc-next-app-dir November 1, 2026 22:48 Inactive
@vercel
vercel Bot temporarily deployed to Preview – examples-todomvc November 1, 2026 22:48 Inactive
Base automatically changed from cursor/port-v12-website-28db to main November 1, 2026 23:10
trpc-bot pushed a commit to trpc/examples-tanstack-start-sse-chat that referenced this pull request Nov 1, 2026
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
> Checklist:
>
> - [x] Twoslash: all 397 Twoslash blocks in main's docs and blog
compile against v11 (`pnpm --filter www check-twoslash`)
> - [x] URLs: all 699 of trpc.io's URLs (583 sitemap URLs plus
`vercel.json`'s redirect sources) work, on the build and on this PR's
preview (`www/build/legacy-urls-check.ts`)
> - [x] Renames: the copied docs and blog are git renames of main's
files wherever git can pair them (see "Renames")
> - [x] Search: v12's local fuzzy search. Algolia DocSearch is its own
PR, [#7772](trpc/trpc#7772), stacked on this one
> - [x] API reference: TypeDoc pages at main's `/docs/typedoc/...` paths
(369 pages)
> - [x] Top bar in main's order; right-clicking the logo opens `/media`,
as on main
> - [x] Sponsors: daily sync workflow ported from v12
> - [x] Lint: oxlint and oxfmt only, under main's oxlint config
> - [x] Social cards: drawn by the site at `/og/<page path>.png`, in the
old designs; `www/og-image` is deleted
([#7782](trpc/trpc#7782), merged into this PR)
> - [x] Home hero: trpc.io's "Star" button with the live star count, in
place of "Read the docs"
>
> Stacked on this one: the new logo,
[#7778](trpc/trpc#7778); Algolia search,
[#7772](trpc/trpc#7772).
>
> Merged into this one: social cards from a TanStack Start route,
[#7782](trpc/trpc#7782).

## Why

- The v12 branch has a new website: TanStack Start, Tailwind 4,
shadcn-based UI, and better Twoslash rendering.
- This moves that site onto `main`, with main's v11 docs, blog and pages
as the content.
- The site stays in `www`, with a layout close to v12's, so it can later
be merged back into v12.

## What

- **Site:** `www` is now v12's site (TanStack Start + Vite, Tailwind 4,
Effect build scripts, Shiki + Twoslash), with v12-only features removed
(v12 docs, demos, codemods, experiments menu).
- **Content:**
- v11 docs are in `www/v11/docs`, v10's in `www/v10/docs`, v9's in
`www/v9/docs`, and the blog in `www/blog`.
- The pages keep main's Docusaurus syntax: frontmatter, `:::`
admonitions, HTML comments, `twoslash include` blocks and partials. The
site reads it at render time (`www/build/docusaurus-syntax.ts`), so the
files stay close to main's and git sees renames.
- Each page's frontmatter gains `section`, `parent` and `order`, which
build the sidebar that `sidebars.js` used to. v10 and v9 links to GitHub
point at their release tag rather than `main`.
- **URLs:** every URL of trpc.io's stays where it is, including
`/docs/v10/...` and `/docs/v9/...`. See "URL changes" for the few
redirects that changed.
- **Top bar:** main's order. The left side has Docs, Quickstart, Awesome
tRPC Collection and Using Next.js, from one `docsLinks` list. The right
side has GitHub, X, Discord, the version picker, the theme toggle, then
search.
- The version picker shows just the version (`v11`); the menu still says
which versions are unmaintained.
  - On phones, X and Discord move into the menu next to GitHub.
- **Search:** v12's fuzzy search over a local index of titles, headings
and descriptions, for the version you're reading. Algolia DocSearch is
in [#7772](trpc/trpc#7772).
- **Shared UI:** `@shared/ui`, in `tooling/ui`, is a workspace package
that the site and the examples can depend on (`"@shared/ui":
"workspace:*"`).
- `@shared/ui/globals.css` gives the full styling, at about 230 kB (32
kB gzipped).
- `@shared/ui/theme.css` gives only the tokens, so consumers can scan
just the components they use:
    ```css
    @import 'tailwindcss';
    @import '@shared/ui/theme.css';
@source '../node_modules/@shared/ui/src/components/{button,card}.tsx';
    ```
  - It's left out of test coverage, as it was when it lived under `www`.
- **Dependencies:**
- The site's exact pins (React 19.3, Tailwind 4, Effect 4, TanStack
Start, and the samples' versions) live in a named pnpm catalog,
`catalogs.www`.
- `manypkg` skips `catalog:` specifiers, so its "most common range" fix
no longer rewrites the site's or the examples' versions.
- The lockfile is main's plus the site's new packages, so the libraries'
resolved versions don't change.
- The root has its own `react` and `react-dom` (`^19.1.0`, as main
resolves them). Without them, `@testing-library/react` in the package
tests picked up the site's React 19.3 and failed.
- **Twoslash:**
- Main's samples compile in `www/samples/v11` against the workspace
`@trpc/*` packages.
- `pnpm --filter www check-twoslash` checks every Twoslash block in the
docs and blog. A partial's `twoslash include` blocks apply only inside
that partial, as Docusaurus had it.
- **API reference:**
  - `www/api-reference` runs TypeDoc with main's versions and options.
- `convert.ts` turns the output into pages at the same
`/docs/typedoc/...` paths, in a collapsed "API Reference" sidebar
section.
  - These pages are left out of `llms.txt`, as on main.
- **Sitemap:** lists every page, without `lastmod`. The build fails if a
prerendered page is missing from it, except `/404` and `noindex` pages
(`www/build/vercel-output.ts`).
- **Old-URL check:** `www/build/legacy-urls-check.ts` runs at the end of
the build. It sends each of trpc.io's sitemap URLs
(`www/build/trpc-io-urls.txt`) and each `vercel.json` redirect source
through the built routes, and fails if one doesn't land on a page.
`--base <url>` runs the same check against a deploy.
- **`/media`:** the page is kept, and right-clicking the logo opens it,
as on main.
- **Sponsors:**
  - `.github/workflows/sponsors.yml` runs daily and on demand.
- It runs `www/build/sponsors-sync.ts`, which updates
`www/sponsors.json` and the README's sponsors section from GitHub
Sponsors.
- It commits to `main` only when a sponsor joins, leaves or changes
tier.
- The checkout uses `secrets.ACCESS_TOKEN`, as `release.yml` does: the
"main" rule set rejects pushes made with `GITHUB_TOKEN`.
- The README's sponsors section is regenerated in v12's layout, with the
same sponsors.
- **Vercel:**
- `www/vercel.json` builds with `cd .. && pnpm turbo --filter www build`
into `.vercel/output` (Build Output API).
- Main's redirects stay in `www/vercel.json`, in main's order and
format; the build turns them into routes.
- The install skips Playwright's browser download, which the site
doesn't use. That took the preview build from 4 minutes to 2.
- **Home hero:** trpc.io's "Star" button is back, in place of "Read the
docs", followed by Quickstart as on trpc.io.
- The browser fetches the star count from GitHub's repo API. Once it
loads, the number fades and slides in, as on trpc.io; with
`prefers-reduced-motion` it just appears.
- Before it loads, or if the fetch fails, the button shows "Star" alone.
Its width is reserved for a five-digit count, so nothing moves when the
number arrives.
- **Social cards** ([#7782](trpc/trpc#7782),
merged into this PR):
- `/og/<page path>.png` (`/og/index.png` for the home page) is drawn on
request by `www/src/routes/og.$.ts`, with satori and
`@resvg/resvg-wasm`. The card list is made at build time, and a path
with no card is a 404.
  - The designs are the old `og-image` service's, not modernized:
- Home: logo, tagline, subtitle, live GitHub stars and `@trpc/server`'s
npm weekly downloads.
- Post: date, title, description, reading time, and each author's
avatar, name and title. An avatar that doesn't load shows the author's
initials.
- Docs: logo, title, description and URL. The blog index, sponsor, media
and search pages use this one too.
- Stars, downloads and avatars are fetched when a card is drawn, each
with a 4 s timeout; a failed one is left off the card. The home card is
cached for a day, and a card missing something it fetched for 10
minutes.
- Avatars from GitHub (`github.com` or a `*.githubusercontent.com` host,
checked on the URL's hostname) are fetched at 128 px.
- `og:image` and `twitter:image` are on the deployment's own host:
`https://trpc.io` in production, the preview's URL on a preview.
`og:url` and the canonical link stay on trpc.io.
- Deployment Protection is off on the `www` project, so crawlers can
fetch a preview's cards.
- `www/og-image` is deleted, with its references in CI,
`.oxlintrc.json`, `scripts/preview-urls.ts` and the PR template.
- **Lockfile:** without `www/og-image`'s importer, pnpm moved
`@trpc/tanstack-react-query`'s vitest onto vite 8.3.5. That made a
second vitest copy, which `@testing-library/jest-dom/vitest`'s matcher
types don't extend, so `typecheck` failed. The lockfile keeps that
package on the root's vitest and drops the copy nothing uses.
- **CI:** `typecheck-www` also runs the www tests and the Twoslash
check.
- **Tooling:** oxlint and oxfmt only. A root `tailwindcss` devDependency
lets oxfmt sort classes against the v4 stylesheet.

### Renames

Against main, `www` has 205 renames (18 of them unchanged), 174 added
files, 85 deleted and 4 modified.

Twenty-one docs pages can't be renames, so git shows them as deleted and
added:

- **Pages that were MDX stubs around a shared partial:**
- `community/contributing`, `community/love` and `community/sponsors` in
v11 and v10;
  - v9's `contributing`, `love` and `sponsors`;
- `main/concepts` and `main/videos-and-community-resources` in v11 and
v10.

Each stub only imported a file from `www/unversioned` or a partial. The
new page holds that content itself, so no single old file is more than
half of it.
- **`server/adapters-intro.md`, in v11 and v10:** it's now
`server/adapters.md`, named for its URL (`/docs/server/adapters`), and
its relative links became absolute. That leaves it under git's 50%
similarity.
- **Pages that are gone, with their URLs redirecting:**
`landing-intro/Step1`–`Step3` and `test-sub`. `_import-approuter` was a
partial that's now inlined.

The other added files are the site's own code, the generated API
reference, and the samples.

### Docs and blog changes

On top of the frontmatter and link changes above, the only content
changes are:

- `blog/tinyrpc-client.md`: `// ^? provide…` became `// ^ provide…`. The
`?` made Twoslash read the comment as a type query, which doesn't
compile.
- `v11/sections.json`: an "API Reference" sidebar section for the
generated TypeDoc pages.
- The generated TypeDoc pages under `/docs/typedoc`.

v12 content that had leaked into the port has been removed: the sponsor
page's "v12 is a rewrite" section, the home page's social card (v12 pill
and install command), and READMEs and comments pointing at v12's paths.

### URL changes

Main's redirects are kept, except:

- **Removed:**
- `/docs/client` → `/docs/client/introduction`: it hid v11's client
overview page.
- `/sponsor` → GitHub Sponsors: `/sponsor` is now the site's sponsor
page, which replaces `/pricing`.
- **Fixed destinations**, to the page's URL now:
- `/docs/aborting-procedures` →
`/docs/client/vanilla/aborting-procedure-calls`
  - `/docs/extra` → `/docs/further-reading`
  - `/docs/server/api-handler` → `/docs/server/adapters`
- **Added:**
- `/v10/docs/*` → `/docs/v10/*` and `/v9/docs/*` → `/docs/v9/*`, for
anyone who used the v12 site's paths.
- `/docs/introduction`, `/docs/v10/introduction` and
`/docs/v9/introduction` → each version's base path (`/docs`,
`/docs/v10`, `/docs/v9`), where the first page is served.
  - `/pricing` and `/sponsors` → `/sponsor`.
  - `/blog/archive` and `/blog/authors` → `/blog`.
- `/docs/landing-intro/*`, `/docs/v10/landing-intro/*` and `/docs/test`
→ `/`.
- Trailing slashes and `index.html` redirect to the path without them.

### Needs setup

- **Sponsors secret:** the workflow reads `SPONSORS_SYNC_GITHUB_TOKEN`,
a classic token of KATT's with `read:user` and `read:org`. Without it,
the workflow skips with a warning.
- **Vercel `www` project:** check that the dashboard doesn't override
`vercel.json`'s framework, install command or build command.
- **For you: delete the `og-image` Vercel project.** It's untouched, and
its root directory, `www/og-image`, is gone, so its check fails on every
PR until it's removed.

### Follow-ups

- **Social card designs:** a PR to modernize them, and maybe add a
light-mode variant.
- **Faster deploys:** most of the remaining 2 minutes is turbo building
the `@trpc/*` packages for the API reference, with nothing cached
between builds. Turbo's remote cache or caching the TypeDoc output would
cut most of that.

## Links

- [Home](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/):
top bar in main's order, and the "Star" button with the live count.
- Docs:
[Introduction](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs):
search with ⌘K; right-click the logo for `/media`.
- Docs: [TanStack React Query
usage](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/client/tanstack-react-query/usage)
- Docs: [Next.js Pages Router
setup](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/client/nextjs/pages-router/setup)
- Docs: [API reference,
`@trpc/server`](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/typedoc/server)
- Docs: [v10
Introduction](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/v10),
at trpc.io's URL. The version picker switches to the same page in
another version.
- Docs: [v10 React Query
Integration](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/v10/client/react)
- Docs: [v9
Introduction](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/v9)
- Redirect:
[`/v10/docs/client/react`](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/v10/docs/client/react)
goes to `/docs/v10/client/react`.
-
[Blog](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/blog),
and a post: [Writing a tiny tRPC
client](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/blog/tinyrpc-client)
-
[Media](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/media):
the logo fits its card.
-
[Sponsor](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/sponsor)
-
[Sitemap](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/sitemap.xml)

Social cards, each next to a page that uses it:

- Home:
[page](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/index.png):
live stars and downloads.
- Docs:
[Introduction](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/docs.png)
- v10 docs: [React Query
Integration](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/v10/client/react),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/docs/v10/client/react.png)
- A post with two authors: [Introducing the new TanStack React Query
integration](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/blog/introducing-tanstack-react-query-client),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/blog/introducing-tanstack-react-query-client.png)
- Blog index:
[page](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/blog),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/blog.png)
- Sponsor:
[page](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/sponsor),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/sponsor.png)
- Media:
[page](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/media),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/media.png)
- Search:
[page](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/search),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/search.png)

## Alternatives considered

- **Keeping Docusaurus and restyling it.** That would lose v12's
Twoslash rendering and build, and the two sites would drift further
apart.
- **Moving the site out of `www`.** That would break the Vercel project
and make the later merge back into v12 harder.
- **Keeping `@shared/ui` in `www/shared/ui`, as on v12.** The examples
use it too, so it now lives in `tooling/ui`.
- **Converting the pages to the new site's syntax when copying them.**
That's what the port first did. It turned most of the copies into new
files in git's eyes, which hid what changed. Reading Docusaurus syntax
at render time keeps them renames.
- **Serving v10 and v9 at `/v10/docs` and `/v9/docs`, as v12 does.**
That would move 111 of trpc.io's URLs behind redirects. They stay at
`/docs/v10` and `/docs/v9`.
- **Keeping `www/og-image` for the social cards.** That's two Vercel
projects and two deploys for one site, and previews would show
production's cards. Drawing every card at build time instead would
freeze the stars and downloads between deploys.
- **`lastmod` from git history.** The port's moves and reformats made
the dates unreliable for most pages, and a wrong date is worse than
none.

## Testing

- `pnpm turbo --filter www build` passes, including the sitemap check
and the old-URL check: "All 699 of trpc.io's URLs work on
.vercel/output".
- `node build/legacy-urls-check.ts --base
https://www-git-cursor-port-v12-website-28db-trpc.vercel.app`: all 699
URLs work on the preview.
- `pnpm typecheck-www` (site, samples, `@shared/ui`): no errors.
- `pnpm --filter www test`: 257 tests pass, with new ones for the
Docusaurus syntax, the old-URL check, partials' Twoslash includes, the
social cards, and the avatar host check (a lookalike host such as
`evilgithubusercontent.com` isn't treated as GitHub's).
- `pnpm --filter www check-twoslash`: all 397 blocks in 467 files
compile.
- `pnpm manypkg check`, `pnpm oxfmt --check .` and `pnpm lint` pass.
- With `curl` on the current preview: each page under "Links" returns
200, and the redirects listed there return 308 to the right page.
- Checked in Chrome on an earlier preview, before the move to
`/docs/v10`, light and dark, at 1280px and 390px:
- Home, docs, a blog post, API reference, v10 docs, `/sponsor` and
`/media`.
  - Search opens a result with Enter.
  - Right-clicking the logo opens `/media`.
  - The version picker switches `useQuery` to the v10 page.
  - The top bar doesn't overflow at 390, 640, 800, 1024 or 1280px.
  - No page errors.
- On the current preview, with no credentials:
- Each social card under "Links" returns a 200 PNG, and `/docs` has
`og:image`
`https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/docs.png`.
- The "Star" button shows 40,759 at 1280px and 390px. With GitHub's API
blocked, it shows "Star" alone. Its width is 120 px before the count
loads, after, and when the fetch fails.
- CI passes, except `Vercel – og-image`, which fails because
`www/og-image` is deleted. Deleting that Vercel project clears it.

"Star" button on the preview, desktop and phone:

![Star button,
desktop](https://cursor.com/artifacts/c/art-2d6bd763-4f00-4197-804a-6086be0ae35f)

![Star button,
phone](https://cursor.com/artifacts/c/art-dabed8ea-368a-45d0-b548-fb14533a6c0d)

Social cards (local renders):

![Home
card](https://cursor.com/artifacts/c/art-a5d6b968-4866-4f35-a74c-19f7d935ed73)
![Post
card](https://cursor.com/artifacts/c/art-2b22d55d-fbde-4070-9d15-ccd6b6d458b9)
![v10 docs
card](https://cursor.com/artifacts/c/art-54256e84-e9e9-4792-879a-d006b5061edb)
![Sponsor
card](https://cursor.com/artifacts/c/art-cb887015-e180-490e-aeea-b6522fbb6cd0)

![Top bar,
trpc.io](https://cursor.com/artifacts/c/art-5c181c04-4ec4-4490-91b7-10614ad473d1)

![Old trpc.io top
bar](https://cursor.com/artifacts/c/art-3e7e90fb-1651-41db-83e9-da5284e00476)

![/media,
dark](https://cursor.com/artifacts/c/art-c29c6d91-185b-4689-a8dd-a5bcb57aa103)
<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-927521a8-1313-5f37-b0a9-b2b90abc28db?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-927521a8-1313-5f37-b0a9-b2b90abc28db&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

<!-- codesmith:footer -->
---
<a
href="https://app.blacksmith.sh/trpc/codesmith/trpc/pr/7771?autoLogin=true&ref=codesmith_pr_footer"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v3.svg"><img
alt="View with [code]smith"
src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png"
width="162" height="28"></picture></a> <a
href="https://backend.blacksmith.sh/track/enable-autofix?expires=1796151782&installation_model_id=443568&pr_number=7771&ref=codesmith_pr_footer&repository=trpc%2Ftrpc&return_to=https%3A%2F%2Fgithub.com%2Ftrpc%2Ftrpc%2Fpull%2F7771&signature=33b815a4659c99c6c5185bb71b4375e8aa239f626eb325e11ffb53d89ab37675"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img
alt="Autofix with [code]smith"
src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png"
width="190" height="28"></picture></a>
<sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you
need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/www-algolia-search-28db branch from 02f8e7c to 202ba3c Compare November 1, 2026 23:40
@vercel
vercel Bot temporarily deployed to Preview – examples-todomvc November 1, 2026 23:40 Inactive
@vercel
vercel Bot temporarily deployed to Preview – next-prisma-starter November 1, 2026 23:40 Inactive
@vercel
vercel Bot temporarily deployed to Preview – trpc-next-app-dir November 1, 2026 23:40 Inactive
meefs pushed a commit to meefs/trpc that referenced this pull request Nov 2, 2026
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
> Checklist:
>
> - [x] Twoslash: all 397 Twoslash blocks in main's docs and blog
compile against v11 (`pnpm --filter www check-twoslash`)
> - [x] URLs: all 699 of trpc.io's URLs (583 sitemap URLs plus
`vercel.json`'s redirect sources) work, on the build and on this PR's
preview (`www/build/legacy-urls-check.ts`)
> - [x] Renames: the copied docs and blog are git renames of main's
files wherever git can pair them (see "Renames")
> - [x] Search: v12's local fuzzy search. Algolia DocSearch is its own
PR, [trpc#7772](trpc#7772), stacked on this one
> - [x] API reference: TypeDoc pages at main's `/docs/typedoc/...` paths
(369 pages)
> - [x] Top bar in main's order; right-clicking the logo opens `/media`,
as on main
> - [x] Sponsors: daily sync workflow ported from v12
> - [x] Lint: oxlint and oxfmt only, under main's oxlint config
> - [x] Social cards: drawn by the site at `/og/<page path>.png`, in the
old designs; `www/og-image` is deleted
([trpc#7782](trpc#7782), merged into this PR)
> - [x] Home hero: trpc.io's "Star" button with the live star count, in
place of "Read the docs"
>
> Stacked on this one: the new logo,
[trpc#7778](trpc#7778); Algolia search,
[trpc#7772](trpc#7772).
>
> Merged into this one: social cards from a TanStack Start route,
[trpc#7782](trpc#7782).

## Why

- The v12 branch has a new website: TanStack Start, Tailwind 4,
shadcn-based UI, and better Twoslash rendering.
- This moves that site onto `main`, with main's v11 docs, blog and pages
as the content.
- The site stays in `www`, with a layout close to v12's, so it can later
be merged back into v12.

## What

- **Site:** `www` is now v12's site (TanStack Start + Vite, Tailwind 4,
Effect build scripts, Shiki + Twoslash), with v12-only features removed
(v12 docs, demos, codemods, experiments menu).
- **Content:**
- v11 docs are in `www/v11/docs`, v10's in `www/v10/docs`, v9's in
`www/v9/docs`, and the blog in `www/blog`.
- The pages keep main's Docusaurus syntax: frontmatter, `:::`
admonitions, HTML comments, `twoslash include` blocks and partials. The
site reads it at render time (`www/build/docusaurus-syntax.ts`), so the
files stay close to main's and git sees renames.
- Each page's frontmatter gains `section`, `parent` and `order`, which
build the sidebar that `sidebars.js` used to. v10 and v9 links to GitHub
point at their release tag rather than `main`.
- **URLs:** every URL of trpc.io's stays where it is, including
`/docs/v10/...` and `/docs/v9/...`. See "URL changes" for the few
redirects that changed.
- **Top bar:** main's order. The left side has Docs, Quickstart, Awesome
tRPC Collection and Using Next.js, from one `docsLinks` list. The right
side has GitHub, X, Discord, the version picker, the theme toggle, then
search.
- The version picker shows just the version (`v11`); the menu still says
which versions are unmaintained.
  - On phones, X and Discord move into the menu next to GitHub.
- **Search:** v12's fuzzy search over a local index of titles, headings
and descriptions, for the version you're reading. Algolia DocSearch is
in [trpc#7772](trpc#7772).
- **Shared UI:** `@shared/ui`, in `tooling/ui`, is a workspace package
that the site and the examples can depend on (`"@shared/ui":
"workspace:*"`).
- `@shared/ui/globals.css` gives the full styling, at about 230 kB (32
kB gzipped).
- `@shared/ui/theme.css` gives only the tokens, so consumers can scan
just the components they use:
    ```css
    @import 'tailwindcss';
    @import '@shared/ui/theme.css';
@source '../node_modules/@shared/ui/src/components/{button,card}.tsx';
    ```
  - It's left out of test coverage, as it was when it lived under `www`.
- **Dependencies:**
- The site's exact pins (React 19.3, Tailwind 4, Effect 4, TanStack
Start, and the samples' versions) live in a named pnpm catalog,
`catalogs.www`.
- `manypkg` skips `catalog:` specifiers, so its "most common range" fix
no longer rewrites the site's or the examples' versions.
- The lockfile is main's plus the site's new packages, so the libraries'
resolved versions don't change.
- The root has its own `react` and `react-dom` (`^19.1.0`, as main
resolves them). Without them, `@testing-library/react` in the package
tests picked up the site's React 19.3 and failed.
- **Twoslash:**
- Main's samples compile in `www/samples/v11` against the workspace
`@trpc/*` packages.
- `pnpm --filter www check-twoslash` checks every Twoslash block in the
docs and blog. A partial's `twoslash include` blocks apply only inside
that partial, as Docusaurus had it.
- **API reference:**
  - `www/api-reference` runs TypeDoc with main's versions and options.
- `convert.ts` turns the output into pages at the same
`/docs/typedoc/...` paths, in a collapsed "API Reference" sidebar
section.
  - These pages are left out of `llms.txt`, as on main.
- **Sitemap:** lists every page, without `lastmod`. The build fails if a
prerendered page is missing from it, except `/404` and `noindex` pages
(`www/build/vercel-output.ts`).
- **Old-URL check:** `www/build/legacy-urls-check.ts` runs at the end of
the build. It sends each of trpc.io's sitemap URLs
(`www/build/trpc-io-urls.txt`) and each `vercel.json` redirect source
through the built routes, and fails if one doesn't land on a page.
`--base <url>` runs the same check against a deploy.
- **`/media`:** the page is kept, and right-clicking the logo opens it,
as on main.
- **Sponsors:**
  - `.github/workflows/sponsors.yml` runs daily and on demand.
- It runs `www/build/sponsors-sync.ts`, which updates
`www/sponsors.json` and the README's sponsors section from GitHub
Sponsors.
- It commits to `main` only when a sponsor joins, leaves or changes
tier.
- The checkout uses `secrets.ACCESS_TOKEN`, as `release.yml` does: the
"main" rule set rejects pushes made with `GITHUB_TOKEN`.
- The README's sponsors section is regenerated in v12's layout, with the
same sponsors.
- **Vercel:**
- `www/vercel.json` builds with `cd .. && pnpm turbo --filter www build`
into `.vercel/output` (Build Output API).
- Main's redirects stay in `www/vercel.json`, in main's order and
format; the build turns them into routes.
- The install skips Playwright's browser download, which the site
doesn't use. That took the preview build from 4 minutes to 2.
- **Home hero:** trpc.io's "Star" button is back, in place of "Read the
docs", followed by Quickstart as on trpc.io.
- The browser fetches the star count from GitHub's repo API. Once it
loads, the number fades and slides in, as on trpc.io; with
`prefers-reduced-motion` it just appears.
- Before it loads, or if the fetch fails, the button shows "Star" alone.
Its width is reserved for a five-digit count, so nothing moves when the
number arrives.
- **Social cards** ([trpc#7782](trpc#7782),
merged into this PR):
- `/og/<page path>.png` (`/og/index.png` for the home page) is drawn on
request by `www/src/routes/og.$.ts`, with satori and
`@resvg/resvg-wasm`. The card list is made at build time, and a path
with no card is a 404.
  - The designs are the old `og-image` service's, not modernized:
- Home: logo, tagline, subtitle, live GitHub stars and `@trpc/server`'s
npm weekly downloads.
- Post: date, title, description, reading time, and each author's
avatar, name and title. An avatar that doesn't load shows the author's
initials.
- Docs: logo, title, description and URL. The blog index, sponsor, media
and search pages use this one too.
- Stars, downloads and avatars are fetched when a card is drawn, each
with a 4 s timeout; a failed one is left off the card. The home card is
cached for a day, and a card missing something it fetched for 10
minutes.
- Avatars from GitHub (`github.com` or a `*.githubusercontent.com` host,
checked on the URL's hostname) are fetched at 128 px.
- `og:image` and `twitter:image` are on the deployment's own host:
`https://trpc.io` in production, the preview's URL on a preview.
`og:url` and the canonical link stay on trpc.io.
- Deployment Protection is off on the `www` project, so crawlers can
fetch a preview's cards.
- `www/og-image` is deleted, with its references in CI,
`.oxlintrc.json`, `scripts/preview-urls.ts` and the PR template.
- **Lockfile:** without `www/og-image`'s importer, pnpm moved
`@trpc/tanstack-react-query`'s vitest onto vite 8.3.5. That made a
second vitest copy, which `@testing-library/jest-dom/vitest`'s matcher
types don't extend, so `typecheck` failed. The lockfile keeps that
package on the root's vitest and drops the copy nothing uses.
- **CI:** `typecheck-www` also runs the www tests and the Twoslash
check.
- **Tooling:** oxlint and oxfmt only. A root `tailwindcss` devDependency
lets oxfmt sort classes against the v4 stylesheet.

### Renames

Against main, `www` has 205 renames (18 of them unchanged), 174 added
files, 85 deleted and 4 modified.

Twenty-one docs pages can't be renames, so git shows them as deleted and
added:

- **Pages that were MDX stubs around a shared partial:**
- `community/contributing`, `community/love` and `community/sponsors` in
v11 and v10;
  - v9's `contributing`, `love` and `sponsors`;
- `main/concepts` and `main/videos-and-community-resources` in v11 and
v10.

Each stub only imported a file from `www/unversioned` or a partial. The
new page holds that content itself, so no single old file is more than
half of it.
- **`server/adapters-intro.md`, in v11 and v10:** it's now
`server/adapters.md`, named for its URL (`/docs/server/adapters`), and
its relative links became absolute. That leaves it under git's 50%
similarity.
- **Pages that are gone, with their URLs redirecting:**
`landing-intro/Step1`–`Step3` and `test-sub`. `_import-approuter` was a
partial that's now inlined.

The other added files are the site's own code, the generated API
reference, and the samples.

### Docs and blog changes

On top of the frontmatter and link changes above, the only content
changes are:

- `blog/tinyrpc-client.md`: `// ^? provide…` became `// ^ provide…`. The
`?` made Twoslash read the comment as a type query, which doesn't
compile.
- `v11/sections.json`: an "API Reference" sidebar section for the
generated TypeDoc pages.
- The generated TypeDoc pages under `/docs/typedoc`.

v12 content that had leaked into the port has been removed: the sponsor
page's "v12 is a rewrite" section, the home page's social card (v12 pill
and install command), and READMEs and comments pointing at v12's paths.

### URL changes

Main's redirects are kept, except:

- **Removed:**
- `/docs/client` → `/docs/client/introduction`: it hid v11's client
overview page.
- `/sponsor` → GitHub Sponsors: `/sponsor` is now the site's sponsor
page, which replaces `/pricing`.
- **Fixed destinations**, to the page's URL now:
- `/docs/aborting-procedures` →
`/docs/client/vanilla/aborting-procedure-calls`
  - `/docs/extra` → `/docs/further-reading`
  - `/docs/server/api-handler` → `/docs/server/adapters`
- **Added:**
- `/v10/docs/*` → `/docs/v10/*` and `/v9/docs/*` → `/docs/v9/*`, for
anyone who used the v12 site's paths.
- `/docs/introduction`, `/docs/v10/introduction` and
`/docs/v9/introduction` → each version's base path (`/docs`,
`/docs/v10`, `/docs/v9`), where the first page is served.
  - `/pricing` and `/sponsors` → `/sponsor`.
  - `/blog/archive` and `/blog/authors` → `/blog`.
- `/docs/landing-intro/*`, `/docs/v10/landing-intro/*` and `/docs/test`
→ `/`.
- Trailing slashes and `index.html` redirect to the path without them.

### Needs setup

- **Sponsors secret:** the workflow reads `SPONSORS_SYNC_GITHUB_TOKEN`,
a classic token of KATT's with `read:user` and `read:org`. Without it,
the workflow skips with a warning.
- **Vercel `www` project:** check that the dashboard doesn't override
`vercel.json`'s framework, install command or build command.
- **For you: delete the `og-image` Vercel project.** It's untouched, and
its root directory, `www/og-image`, is gone, so its check fails on every
PR until it's removed.

### Follow-ups

- **Social card designs:** a PR to modernize them, and maybe add a
light-mode variant.
- **Faster deploys:** most of the remaining 2 minutes is turbo building
the `@trpc/*` packages for the API reference, with nothing cached
between builds. Turbo's remote cache or caching the TypeDoc output would
cut most of that.

## Links

- [Home](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/):
top bar in main's order, and the "Star" button with the live count.
- Docs:
[Introduction](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs):
search with ⌘K; right-click the logo for `/media`.
- Docs: [TanStack React Query
usage](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/client/tanstack-react-query/usage)
- Docs: [Next.js Pages Router
setup](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/client/nextjs/pages-router/setup)
- Docs: [API reference,
`@trpc/server`](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/typedoc/server)
- Docs: [v10
Introduction](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/v10),
at trpc.io's URL. The version picker switches to the same page in
another version.
- Docs: [v10 React Query
Integration](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/v10/client/react)
- Docs: [v9
Introduction](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/v9)
- Redirect:
[`/v10/docs/client/react`](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/v10/docs/client/react)
goes to `/docs/v10/client/react`.
-
[Blog](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/blog),
and a post: [Writing a tiny tRPC
client](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/blog/tinyrpc-client)
-
[Media](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/media):
the logo fits its card.
-
[Sponsor](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/sponsor)
-
[Sitemap](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/sitemap.xml)

Social cards, each next to a page that uses it:

- Home:
[page](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/index.png):
live stars and downloads.
- Docs:
[Introduction](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/docs.png)
- v10 docs: [React Query
Integration](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/docs/v10/client/react),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/docs/v10/client/react.png)
- A post with two authors: [Introducing the new TanStack React Query
integration](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/blog/introducing-tanstack-react-query-client),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/blog/introducing-tanstack-react-query-client.png)
- Blog index:
[page](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/blog),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/blog.png)
- Sponsor:
[page](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/sponsor),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/sponsor.png)
- Media:
[page](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/media),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/media.png)
- Search:
[page](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/search),
[card](https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/search.png)

## Alternatives considered

- **Keeping Docusaurus and restyling it.** That would lose v12's
Twoslash rendering and build, and the two sites would drift further
apart.
- **Moving the site out of `www`.** That would break the Vercel project
and make the later merge back into v12 harder.
- **Keeping `@shared/ui` in `www/shared/ui`, as on v12.** The examples
use it too, so it now lives in `tooling/ui`.
- **Converting the pages to the new site's syntax when copying them.**
That's what the port first did. It turned most of the copies into new
files in git's eyes, which hid what changed. Reading Docusaurus syntax
at render time keeps them renames.
- **Serving v10 and v9 at `/v10/docs` and `/v9/docs`, as v12 does.**
That would move 111 of trpc.io's URLs behind redirects. They stay at
`/docs/v10` and `/docs/v9`.
- **Keeping `www/og-image` for the social cards.** That's two Vercel
projects and two deploys for one site, and previews would show
production's cards. Drawing every card at build time instead would
freeze the stars and downloads between deploys.
- **`lastmod` from git history.** The port's moves and reformats made
the dates unreliable for most pages, and a wrong date is worse than
none.

## Testing

- `pnpm turbo --filter www build` passes, including the sitemap check
and the old-URL check: "All 699 of trpc.io's URLs work on
.vercel/output".
- `node build/legacy-urls-check.ts --base
https://www-git-cursor-port-v12-website-28db-trpc.vercel.app`: all 699
URLs work on the preview.
- `pnpm typecheck-www` (site, samples, `@shared/ui`): no errors.
- `pnpm --filter www test`: 257 tests pass, with new ones for the
Docusaurus syntax, the old-URL check, partials' Twoslash includes, the
social cards, and the avatar host check (a lookalike host such as
`evilgithubusercontent.com` isn't treated as GitHub's).
- `pnpm --filter www check-twoslash`: all 397 blocks in 467 files
compile.
- `pnpm manypkg check`, `pnpm oxfmt --check .` and `pnpm lint` pass.
- With `curl` on the current preview: each page under "Links" returns
200, and the redirects listed there return 308 to the right page.
- Checked in Chrome on an earlier preview, before the move to
`/docs/v10`, light and dark, at 1280px and 390px:
- Home, docs, a blog post, API reference, v10 docs, `/sponsor` and
`/media`.
  - Search opens a result with Enter.
  - Right-clicking the logo opens `/media`.
  - The version picker switches `useQuery` to the v10 page.
  - The top bar doesn't overflow at 390, 640, 800, 1024 or 1280px.
  - No page errors.
- On the current preview, with no credentials:
- Each social card under "Links" returns a 200 PNG, and `/docs` has
`og:image`
`https://www-git-cursor-port-v12-website-28db-trpc.vercel.app/og/docs.png`.
- The "Star" button shows 40,759 at 1280px and 390px. With GitHub's API
blocked, it shows "Star" alone. Its width is 120 px before the count
loads, after, and when the fetch fails.
- CI passes, except `Vercel – og-image`, which fails because
`www/og-image` is deleted. Deleting that Vercel project clears it.

"Star" button on the preview, desktop and phone:

![Star button,
desktop](https://cursor.com/artifacts/c/art-2d6bd763-4f00-4197-804a-6086be0ae35f)

![Star button,
phone](https://cursor.com/artifacts/c/art-dabed8ea-368a-45d0-b548-fb14533a6c0d)

Social cards (local renders):

![Home
card](https://cursor.com/artifacts/c/art-a5d6b968-4866-4f35-a74c-19f7d935ed73)
![Post
card](https://cursor.com/artifacts/c/art-2b22d55d-fbde-4070-9d15-ccd6b6d458b9)
![v10 docs
card](https://cursor.com/artifacts/c/art-54256e84-e9e9-4792-879a-d006b5061edb)
![Sponsor
card](https://cursor.com/artifacts/c/art-cb887015-e180-490e-aeea-b6522fbb6cd0)

![Top bar,
trpc.io](https://cursor.com/artifacts/c/art-5c181c04-4ec4-4490-91b7-10614ad473d1)

![Old trpc.io top
bar](https://cursor.com/artifacts/c/art-3e7e90fb-1651-41db-83e9-da5284e00476)

![/media,
dark](https://cursor.com/artifacts/c/art-c29c6d91-185b-4689-a8dd-a5bcb57aa103)
<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-927521a8-1313-5f37-b0a9-b2b90abc28db?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-927521a8-1313-5f37-b0a9-b2b90abc28db&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

<!-- codesmith:footer -->
---
<a
href="https://app.blacksmith.sh/trpc/codesmith/trpc/pr/7771?autoLogin=true&ref=codesmith_pr_footer"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v3.svg"><img
alt="View with [code]smith"
src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png"
width="162" height="28"></picture></a> <a
href="https://backend.blacksmith.sh/track/enable-autofix?expires=1796151782&installation_model_id=443568&pr_number=7771&ref=codesmith_pr_footer&repository=trpc%2Ftrpc&return_to=https%3A%2F%2Fgithub.com%2Ftrpc%2Ftrpc%2Fpull%2F7771&signature=33b815a4659c99c6c5185bb71b4375e8aa239f626eb325e11ffb53d89ab37675"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img
alt="Autofix with [code]smith"
src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png"
width="190" height="28"></picture></a>
<sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you
need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
@vercel
vercel Bot temporarily deployed to Preview – trpc-next-app-dir November 2, 2026 00:16 Inactive
@vercel
vercel Bot temporarily deployed to Preview – examples-todomvc November 2, 2026 00:16 Inactive
@vercel
vercel Bot temporarily deployed to Preview – next-prisma-starter November 2, 2026 00:16 Inactive
@cursor
cursor Bot force-pushed the cursor/www-algolia-search-28db branch from 1e5824c to 2009fb2 Compare November 2, 2026 11:23
@vercel
vercel Bot temporarily deployed to Preview – examples-todomvc November 2, 2026 11:23 Inactive
@vercel
vercel Bot temporarily deployed to Preview – trpc-next-app-dir November 2, 2026 11:23 Inactive
@vercel
vercel Bot temporarily deployed to Preview – next-prisma-starter November 2, 2026 11:23 Inactive
cursoragent and others added 3 commits November 2, 2026 11:33
… out DocSearch's modal with its own sizes in the site's colors

docHead emits docsearch:version and docsearch:language, which Algolia's
crawler copies onto each record, and the modal filters on them. Every hit
opens at its own path, the older versions' too, since they're served at
trpc.io's URLs.

Co-authored-by: alexander <[email protected]>
…t untagged

Search sent version:current as a facet filter, and a crawl of a site
without docsearch:version (trpc.io until this merges) leaves every record
without a version, so it found nothing. It now leaves out the other
versions' records instead, and drops hits whose URL is another version's.
A page title's #content anchor is left off the hit's link.

Co-authored-by: alexander <[email protected]>
@cursor
cursor Bot force-pushed the cursor/www-algolia-search-28db branch from 2009fb2 to 731f076 Compare November 2, 2026 11:34
@vercel
vercel Bot temporarily deployed to Preview – trpc-next-app-dir November 2, 2026 11:34 Inactive
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you.

This branch had an error being deployed

1 failed (outdated), 1 active, and 3 inactive deployments
Preview – www — 731f076c Deployed Nov 2, 2026 by vercel[bot]
Preview – examples-todomvc — 731f076c Deployed Nov 2, 2026 by vercel[bot]
Preview – next-prisma-starter — 731f076c Deployed Nov 2, 2026 by vercel[bot]
Preview – trpc-next-app-dir — 731f076c Deployed Nov 2, 2026 by vercel[bot]
Preview – og-image — 1e5824c7 Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants