feat(web): rescue remaining website work (blog posts, docs, SEO) onto master - #3
Merged
Conversation
… SEO, docs, CI Closes the items deferred when docs moved to Docusaurus. Build is green end-to-end; `pnpm install` exits 0; `vp check` clean. Blog (U6): /blog system in the marketing app — src/lib/blog.ts loader (import.meta.glob over src/content/blog/*.mdx), blog/index.tsx listing, blog/$slug.tsx posts, 3 seed posts, rewired rss.ts + generate-rss.mjs. Posts prerender via the top-level `pages` config (the `paths`-inside-`prerender` form was wrong — TanStack Start's `pages` is a sibling of `prerender`). AI-crawler files (R14/R15 — were broken post-Docusaurus-migration): generate-llms-txt.mjs / generate-md-alt.mjs reworked to read ../website/docs (llms.txt + llms-full.txt + per-doc .md). SEO (U8): per-route og:url/og:image + twitter:summary_large_image on about/faq/changelog; full meta + robots:noindex on 404; changelogPage JSON-LD; generate-og-image.mjs (sharp) rasterizes og-image.svg -> og-image.png 1200x630, wired into the build; index.tsx + navbar switched to the PNG; navbar Blog link repointed to the internal /blog. Docs (U5): expanded Docusaurus docs to 18 pages (query-keys, select-pattern, error-handling, persistence, caching, retry, devtools, observers, comparison, api-reference, migration + filled stubs) with Rust examples verified against the crate source. Fixed the MDX JSX-escaping error (observers.mdx heading). CI/infra (U9): .github/workflows/pr-checks.yml (pnpm 11.5.1, vp check/test, build dry-run). pnpm build fix: web/pnpm-workspace.yaml allowBuilds/ onlyBuiltDependencies for esbuild/sharp/workerd (`pnpm install` now exits 0, CI-safe; this pnpm ignores the package.json `pnpm` field). sharp added as a devDep so the OG-image generator resolves. src/routeTree.gen.ts gitignored (generated; tracking it blocked the pre-commit hook). Removed an unused @ts-expect-error in search-dialog.tsx surfaced by vp check. Verified: `pnpm run build` exit 0 — Docusaurus (18 docs), vp build prerenders 9 pages (/, /blog/, 3 blog posts, /faq, /about, /changelog, /404), og-image.png generated, Pagefind indexes 25 pages, RSS (3 posts), llms.txt (18 docs), 18 .md alternatives.
…ON-LD
Finish pass to get the remaining website work actually working + verified.
Blog prerender fix (the big one): MDX + import.meta.glob did not resolve
Content/frontmatter under TanStack Start's prerender SSR (posts rendered
empty, "undefined" title, hydration "Invariant failed" — the KTD-4d risk).
Re-authored the 3 posts as TSX components (CodeBlock for highlighting) with a
static typed POSTS registry in blog.ts (no import.meta.glob/MDX). Routes
unchanged. Verified: /blog/<slug> prerenders with real <h1> + body, 0 console
errors; /blog index lists all 3 posts.
vp test: guarded the @cloudflare/vite-plugin with process.env.VITEST so vitest
no longer crashes on the resolve.external conflict ("No test files found",
clean); vp build/dev still use the cloudflare plugin.
Docs: filled the last 2 onboarding stubs (installation, quick-start) with
content written against the real crate signatures (20 doc pages total).
SEO: wired BlogPosting JSON-LD into /blog/$slug head; documented the retained
TechArticle/HowTo factories.
Hygiene: gitignored the .playwright-mcp browser artifacts (root .gitignore).
Verified: pnpm run build exit 0 (9 prerendered pages), vp check clean
(0 errors). Blog posts render with titles + bodies + 0 console errors.
Combines the divergent `worktree-website-remaining` line (blog TSX posts, filled docs, blog SEO/JSON-LD) with master's canonical website (prerender fix, pr-checks CI, pnpm->bun, API docs from "complete documentation coverage"). Conflict resolutions (common ancestor a69952e): - web/src/lib/blog.ts: union of all 4 posts (master's introducing-gpui-query + remaining's why-gpui-query / cooperative-cancellation / cache-policies). - web/src/routes/blog/$slug.tsx: take remaining (has the loader prerender fix AND the SEO/JSON-LD head, tags, prev/next nav, notFoundComponent). - web/src/routes/blog/index.tsx: take master (richer; lists via getAllBlogPosts). - Docs: per-file take the richer side — master for the filled API/guide docs (queries, mutations, caching, error-handling, devtools, infinite-queries, query-client), remaining for installation/quick-start/retry/persistence/ observers. New pages added clean: api-reference, comparison, migration, query-keys, select-pattern. - Config: keep master's pr-checks.yml, vite.config.ts, wrangler.jsonc, package.json (bun). Union .gitignore + web/.gitignore (+.playwright-mcp/). - Scripts: take remaining's richer generate-llms-txt.mjs / generate-md-alt.mjs. - Honor master's deliberate deletions: pnpm-lock.yaml, pnpm-workspace.yaml (pnpm->bun), rss.ts, generate-rss.mjs, 404.tsx (removed as dead in 7513efd / d459e23 deep website audit).
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.
What
Rescues the stranded
worktree-website-remainingline onto currentmaster. That branch held ~4,500 lines of finished-but-unmerged website work (3 blog posts, filled docs, blog SEO/JSON-LD), but was cut from the old pre-auditfeat/gpui-query-websitebase and had diverged, so it never landed.This merges it in via a 3-way merge (common ancestor
a69952e), keepingmastercanonical wherever it was richer and takingremainingwherever it added real content.Resolutions
web/src/lib/blog.ts— union of all 4 posts (master'sintroducing-gpui-query+ remaining'swhy-gpui-query,cooperative-cancellation,cache-policies-explained).web/src/routes/blog/$slug.tsx— take remaining: it has the loader prerender/hydration fix and the SEO/JSON-LD head, tags, prev/next nav,notFoundComponent.queries,mutations,caching,error-handling,devtools,infinite-queries,query-client); remaining wins oninstallation,quick-start,retry,persistence,observers. New pages added clean:api-reference,comparison,migration,query-keys,select-pattern.pr-checks.yml,vite.config.ts,wrangler.jsonc,package.json(bun). Union.gitignore(+.playwright-mcp/).generate-llms-txt.mjs/generate-md-alt.mjs.pnpm-lock.yaml,pnpm-workspace.yaml(pnpm→bun),rss.ts,generate-rss.mjs,404.tsx(removed as dead in7513efd/d459e23).Verified
Housekeeping done
Removed both stale worktrees (
.claude/worktrees/website-master,website-remaining) and deleted the redundantfix/website-masterbranch (== `origin/master`). Keptworktree-website-remainingas a fallback.