Skip to content

feat(demo): scene protocol docs page + SEO pass - #26

Merged
karngyan merged 1 commit into
mainfrom
docs/scene-protocol-and-seo
Jul 21, 2026
Merged

feat(demo): scene protocol docs page + SEO pass#26
karngyan merged 1 commit into
mainfrom
docs/scene-protocol-and-seo

Conversation

@karngyan

Copy link
Copy Markdown
Collaborator

What

Three things in one docs-site pass:

New docs page: /scene-protocol. Documents the scenes system end to end: the SceneManifest format (contiguity rule, trailing-silence semantics, sidecar captions/storyboard), the kino:-namespaced postMessage wire format with a per-message table and the ready→init handshake, trust boundaries on both sides of the iframe (origin + source checks, the document-pip opener case), createSceneHost usage, scene authoring against the SceneClock, and the ScenesPlayer embed. Carries the same copy-as-markdown mirror as the other pages. Route is /scene-protocol rather than /scenes because the static demo scenes.html shadows /scenes in both dev (Vite html resolution) and production (asset html_handling runs before the SPA fallback).

SEO. The SPA served one identical head for every URL — crawlers and link scrapers that don't execute JS never saw per-page meta. Now demo/seo.json is the single source of truth for per-route title/description, consumed twice:

  • demo/prerender.ts (new pnpm build:demo = vite build + prerender) stamps title, description, canonical, OG, and Twitter tags into a static HTML copy per route (install.html, scene-protocol.html, …) that the Worker's html handling serves for the clean URL, and emits sitemap.xml. Throws if a tag pattern stops matching.
  • usePageMeta in demo/seo.ts keeps the head in sync during client-side navigation and marks the 404 route noindex.

Plus: full default head in index.html (OG/Twitter cards with og.png from the repo banner), robots.txt, real meta on scenes.html, noindex on the scenes-host.html fixture, and a CI step that runs pnpm build:demo so the prerender pass stays exercised.

Film grain removedfilm-grain overlay span + its CSS utility are gone.

Why not TanStack Start

A framework migration rewrites the site and the deploy model to fix what is, for a five-page docs site, a head-tags problem. The prerender pass gets crawler-visible per-route meta with zero new dependencies. If full static HTML bodies ever matter, that's the point to revisit SSG/SSR.

Verification

  • pnpm format:check, typecheck, lint, test (188) all green; pnpm build:demo output inspected — per-route titles/canonicals and sitemap correct.
  • Headless browser: home → Scene protocol → Theming navigation updates title/canonical/og:url per hop; unknown path gets noindex; zero console/page errors; grain element absent.

🤖 Generated with Claude Code

- New /scene-protocol page: manifest format, postMessage wire
  protocol, trust boundaries, host/scene/embed usage. Route avoids
  /scenes, which the static demo scenes.html shadows in both dev
  (Vite html resolution) and prod (asset html_handling beats the
  SPA fallback).
- The SPA served one head for every URL, so crawlers and link
  scrapers that skip JS never saw per-page meta. demo/seo.json now
  drives a post-build prerender (pnpm build:demo) stamping per-route
  title/description/canonical/OG into a static HTML copy per route,
  plus sitemap.xml, robots.txt, an OG image, and runtime head sync
  on client-side navigation. CI builds the demo to keep it honest.
- Remove the film-grain overlay.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
kino dda37af Commit Preview URL

Branch Preview URL
Jul 21 2026, 05:00 PM

@karngyan
karngyan merged commit 8773bbd into main Jul 21, 2026
5 checks passed
@karngyan
karngyan deleted the docs/scene-protocol-and-seo branch July 21, 2026 17:35
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