Skip to content

feat(seo): homepage landing hero, /zh/ mirrors, ranui design tokens#108

Open
chaxus wants to merge 1 commit into
mainfrom
feat/seo-landing-hero
Open

feat(seo): homepage landing hero, /zh/ mirrors, ranui design tokens#108
chaxus wants to merge 1 commit into
mainfrom
feat/seo-landing-hero

Conversation

@chaxus

@chaxus chaxus commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What & why

The homepage was "too plain" for SEO/GEO — for JS users it booted straight into the editor, and the only crawlable content was a <noscript> block. This adds a real, crawlable landing hero and a Chinese /zh/ mirror set, built on the ranui design system so it stays consistent with ran.chaxus.com and the editor.

Changes

Homepage hero

  • Crawlable #landing-hero in the served HTML (H1, status line, document-window mock, 01/02/03 steps, feature grid, FAQ, GitHub "Open source" badge, ecosystem strip). Shown on the bare homepage; hidden the instant a document opens (all open paths + embed). CTAs reuse the existing open/new flows.
  • FAQPage + sameAs/isPartOf structured data (FAQ markup matches the visible FAQ verbatim).

ranui design system

  • Hero consumes ranui's token layer (--ran-*: Geist, #006bff primary, semantic colors, radius/space/shadow, built-in dark theme).
  • public/ran-tokens.css is vendored from ranui/dist/ranui.css and re-synced on every build by bin/build.sh; linked before home.css so tokens resolve on first paint. home.css maps its local aliases onto --ran-* and drops the hand-written dark overrides.

i18n (/zh/)

  • 8 Simplified-Chinese mirror landing pages with localized copy + JSON-LD, reciprocal hreflang (en / zh-Hans / x-default) on the English originals, and 8 new sitemap.xml entries. Subdirectory, not subdomain (keeps authority consolidated).

Review fixes

  • Single H1 (trimmed <noscript>), correct heading order, landing show/hide centralized in lib/ui.ts, AA-contrast --muted, dead-CSS cleanup, deduped octocat via <symbol>/<use>, and a .ghost class-name collision (watermark selector was capturing .btn.ghost and blowing the CTAs up to 340px).

Verification

  • pnpm run lint:ts ✅ · pnpm run format:check ✅ · pnpm run test ✅ (240/240)
  • Browser-verified in light and dark (ranui dark theme applies with no custom dark CSS); no black-blob, no stray control-panel buttons, single H1, no horizontal scroll.

Notes

  • A background rationale doc is included: docs/explorations/2026-07-09-seo-geo-traffic-playbook.md.
  • The @ranui/preview (fileview) landing page + the same token approach for /zh/ are follow-ups, not in this PR.

🤖 Generated with Claude Code

- Homepage: add a crawlable landing hero (#landing-hero) in the served HTML,
  shown on the bare homepage and hidden the moment a document opens; CTAs reuse
  the existing open/new flows. Add FAQPage + sameAs/isPartOf structured data.
- Design system: the hero consumes the ranui design-token layer
  (public/ran-tokens.css, vendored from ranui/dist and re-synced by bin/build.sh)
  through --ran-* variables, inheriting ranui's dark theme; drop the hand-written
  light/dark overrides.
- i18n: 8 Chinese /zh/ mirror landing pages with localized copy and JSON-LD,
  reciprocal hreflang on the 8 English originals, and 8 new sitemap entries.
- Review fixes: single H1 (trimmed noscript), correct heading order, centralized
  landing show/hide in lib/ui.ts, AA-contrast --muted, dead-CSS cleanup, deduped
  octocat via <symbol>/<use>, and a class-name collision (.ghost watermark vs
  .btn.ghost) that blew the CTAs up to watermark size.

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

Copy link
Copy Markdown

Deploying document with  Cloudflare Pages  Cloudflare Pages

Latest commit: b82c4eb
Status: ✅  Deploy successful!
Preview URL: https://0279169e.document-7hm.pages.dev
Branch Preview URL: https://feat-seo-landing-hero.document-7hm.pages.dev

View logs

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