Skip to content

feat(site): bilingual static routes and homepage v2 content (#1191, #1192)#1198

Merged
Astro-Han merged 3 commits into
devfrom
claude/homepage-v2-i18n
Jun 5, 2026
Merged

feat(site): bilingual static routes and homepage v2 content (#1191, #1192)#1198
Astro-Han merged 3 commits into
devfrom
claude/homepage-v2-i18n

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces the marketing site's client-side language swap with two server-rendered static routes — / (en) and /zh-CN/ — sharing one Home.astro body component driven by a lang prop and the I18N copy dictionary. Each page now renders fully localized HTML at build time, and the homepage is expanded with crawlable content sections.

Multilingual SEO/GEO (#1191):

  • Self-referencing canonical plus en / zh-CN / x-default hreflang on every page
  • og:locale + og:locale:alternate and JSON-LD inLanguage per page
  • Bilingual sitemap.xml with xhtml:link alternates for both URLs
  • robots.txt now allows Bytespider (it powers Doubao search, a major CN AI search surface, and does not separate retrieval from training — blocking it drops PawWork from CN AI search)

Homepage v2 content (#1192):

  • Crawlable sections — definition strip, capability bento with real task outputs, model-provider panel, comparison table, download/get block — so the page carries indexable substance, not just a hero
  • Self-hosted Bricolage Grotesque (Latin subset, China-accessible) for display headings
  • Chinese copy polished with DeepSeek v4-pro to remove translation-ese

Why

The previous single-page site served one English DOM and swapped strings on the client, so crawlers and AI search engines (Google, Doubao/Bytespider, etc.) only ever saw English and a thin hero. That hurts both standard SEO and GEO (generative-engine optimization) discoverability, especially in the CN market. Real per-language static HTML with correct hreflang/canonical and substantive crawlable content fixes both.

Related Issue

Closes #1191, closes #1192.

Human Review Status

Pending

Review Focus

  • Base.astro head tags: canonical/hreflang/og:locale correctness per language and the anti-flash theme script staying intact.
  • i18n.ts Chinese copy quality and that every inline <b>/<span>/<u> tag injected via set:html is balanced.
  • robots.txt Bytespider allow — confirm this is the intended CN-discoverability tradeoff.
  • Two owner-approved deviations from docs/DESIGN.md: keeping the pawchip brand mark and the Bricolage display font on the marketing site (DESIGN.md's no-web-fonts / restraint rules govern app chrome, not the landing page).

Risk Notes

Marketing-site-only change (site/), decoupled from the desktop app; no app/runtime/packaging surface touched. Bricolage is self-hosted (Latin subset, no Google CDN), so no China-accessibility regression. None beyond that.

How To Verify

bun run build (in site/): 2 pages built — /index.html + /zh-CN/index.html
EN /index.html:    html lang="en",    canonical https://pawwork.ai/,        hreflang en + zh-CN + x-default
ZH /zh-CN/index.html: html lang="zh-CN", canonical https://pawwork.ai/zh-CN/, hreflang en + zh-CN + x-default, og:locale zh_CN
Heading outline (both pages): 1×H1 + 4×H2, no level skips

Screenshots or Recordings

Visual check: rendered the built /index.html and /zh-CN/index.html in Chromium (light + dark themes), reviewed hero, capability bento, comparison table, and download block; the polished Chinese page was shared with the maintainer for sign-off.

Checklist

  • Type label — this PR carries exactly one of bug, enhancement, task, documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.
  • Routing labels — this PR carries at least one of app, ui, platform, harness, ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.
  • Priority label — this PR carries exactly one of P0, P1, P2, P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.
  • Human Review Status above is set to Pending, Approved by @<reviewer>, or Not required: <reason> (default is Pending; "not required" is restricted to bot-authored low-risk PRs).
  • I linked the related issue, or stated in Summary why there is no issue.
  • I described the review focus and any meaningful risks.
  • I replaced the example block in How To Verify with the real verification steps and the key result for each.
  • I did not introduce unrelated refactors, dependencies, generated files, or file changes beyond the stated scope.
  • (conditional) I manually checked visible UI or copy changes when needed, with screenshots or recordings. Leave unticked only if no visible UI or copy changed.
  • (conditional) I considered macOS and Windows impact for platform, packaging, updater, signing, paths, shell, or permissions changes. Leave unticked only if no platform/packaging surface was touched.
  • (conditional) I called out docs, release notes, dependencies, permissions, credentials, deletion behavior, generated content, or local file changes when relevant. Leave unticked only if none of those surfaces was touched.
  • I reviewed the final diff for unrelated changes and suspicious dependency changes.
  • I am targeting dev, and my PR title and commit messages use Conventional Commits in English.

…1192)

Replace the client-side language swap with two server-rendered static
routes — / (en) and /zh-CN/ — sharing one Home.astro body component
driven by a lang prop and the I18N copy dictionary. Each page renders
fully localized HTML at build time, so crawlers and AI search see real
content in both languages instead of a single English DOM.

SEO/GEO (#1191):
- Self-referencing canonical plus en / zh-CN / x-default hreflang on
  every page
- og:locale + og:locale:alternate and JSON-LD inLanguage per page
- Bilingual sitemap.xml with xhtml:link alternates for both URLs
- robots.txt now allows Bytespider: it powers Doubao search (a major CN
  AI search surface) and does not separate retrieval from training, so
  blocking it drops PawWork from CN AI search

Homepage v2 content (#1192):
- Crawlable sections — definition strip, capability bento with real task
  outputs, model-provider panel, comparison table, download/get block —
  so the page carries indexable substance, not just a hero
- Self-hosted Bricolage Grotesque (Latin subset, China-accessible) for
  display headings
- Chinese copy polished with DeepSeek v4-pro to remove translation-ese

Verification: bun run build emits /index.html (lang=en, canonical /) and
/zh-CN/index.html (lang=zh-CN, canonical /zh-CN/), each with all three
hreflang alternates and a clean 1×H1 + 4×H2 heading outline.
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Astro-Han, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 17 minutes and 19 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d1d0ab9b-5581-4123-9075-53fb09b76f8f

📥 Commits

Reviewing files that changed from the base of the PR and between 474bc28 and 9539927.

⛔ Files ignored due to path filters (1)
  • site/public/fonts/bricolage-grotesque-latin.woff2 is excluded by !**/*.woff2
📒 Files selected for processing (8)
  • site/public/robots.txt
  • site/public/sitemap.xml
  • site/src/components/Home.astro
  • site/src/i18n.ts
  • site/src/layouts/Base.astro
  • site/src/pages/index.astro
  • site/src/pages/zh-CN/index.astro
  • site/src/styles/global.css
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/homepage-v2-i18n

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@Astro-Han Astro-Han added the task Narrow execution, audit, spike, migration, tracking, or upstream follow-up work label Jun 5, 2026
@github-actions github-actions Bot added ui Design system and user interface P2 Medium priority labels Jun 5, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested priority: P2 (includes non-doc, non-test paths outside the low-risk bucket).

P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the PawWork landing page to version 2, refactoring the localization architecture to render static, crawlable pages for English and Chinese instead of relying on client-side language switching. It introduces a shared Home component, updates sitemaps and layout metadata for better SEO, allows the ByteDance crawler, and updates the global stylesheet with new typography and layouts. The review feedback highlights two main improvements: correcting invalid HTML nesting in Home.astro where block-level <div> elements are placed inside an inline <span>, and extending the prefers-reduced-motion media query in global.css to also disable transitions for better accessibility.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread site/src/components/Home.astro Outdated
Comment thread site/src/styles/global.css Outdated
…sitions

Address Gemini review on #1198:
- The free model row wrapped two block-level <div>s (.nm/.ds) in a bare
  inline <span>, which browsers reparent — swap it for a <div> so the
  two text lines stack correctly as a flex item. CSS uses descendant
  selectors (.prow .nm/.ds), so styling is unaffected.
- prefers-reduced-motion only zeroed animation-duration; also zero
  transition-duration and mark scroll-behavior !important so transitions
  on body/.toggle/.dlbtn/.tile are disabled for motion-sensitive users.
@Astro-Han

Copy link
Copy Markdown
Owner Author

Addressed both Gemini review comments in 7fe7d29:

  1. Invalid HTML nesting (Home.astro) — the free model row wrapped two block-level <div>s (.nm/.ds) in a bare inline <span>. Swapped it for a <div> so the two text lines stack correctly as a flex item. Styling is unaffected since the CSS targets .prow .nm / .prow .ds via descendant selectors, not the wrapper.
  2. prefers-reduced-motion (global.css) — the rule only zeroed animation-duration. Now also zeroes transition-duration and marks scroll-behavior: auto !important, so the transitions on body / .toggle / .dlbtn / .tile are disabled for motion-sensitive users.

Rebuilt: bun run build still emits both pages cleanly.

…Base.astro comment

Follow-up review on #1198:
- prefers-reduced-motion now also sets transform: none on .dlbtn /
  .dlbtn.lead / .tile hover, so motion-sensitive users get no positional
  jump on hover. transition-duration was already zeroed, but the -2/-3px
  translateY offset itself still applied instantly.
- Base.astro header comment still described the old client-side language
  swap; rewrite it to reflect the static per-route lang prop that drives
  html lang, canonical, hreflang, and og:locale.
@Astro-Han Astro-Han merged commit e622f35 into dev Jun 5, 2026
34 checks passed
@Astro-Han Astro-Han deleted the claude/homepage-v2-i18n branch June 5, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Medium priority task Narrow execution, audit, spike, migration, tracking, or upstream follow-up work ui Design system and user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] SEO/GEO: expand homepage with crawlable content sections [Task] SEO/GEO: multilingual static routes (/en/ + /zh-CN/) with hreflang

1 participant