From b82c4eb6285e162698a0d732d8d1a39169582d82 Mon Sep 17 00:00:00 2001 From: chaxus Date: Fri, 10 Jul 2026 00:11:59 +0800 Subject: [PATCH 1/8] feat(seo): homepage landing hero, /zh/ mirrors, ranui design tokens - 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 /, 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 --- .prettierignore | 3 + bin/build.sh | 11 + .../2026-07-09-seo-geo-traffic-playbook.md | 152 +++ index.html | 302 +++++- index.ts | 32 +- lib/ui.ts | 27 + public/convert/csv-to-xlsx.html | 3 + public/convert/xlsx-to-csv.html | 3 + public/home.css | 912 ++++++++++++++++++ public/no-signup-document-editor.html | 3 + public/offline-document-editor.html | 3 + public/open/docx.html | 3 + public/open/pptx.html | 3 + public/open/xlsx.html | 3 + public/ran-tokens.css | 1 + public/sitemap.xml | 40 + public/vs/google-docs.html | 3 + public/zh/convert/csv-to-xlsx.html | 161 ++++ public/zh/convert/xlsx-to-csv.html | 161 ++++ public/zh/no-signup-document-editor.html | 172 ++++ public/zh/offline-document-editor.html | 169 ++++ public/zh/open/docx.html | 171 ++++ public/zh/open/pptx.html | 165 ++++ public/zh/open/xlsx.html | 170 ++++ public/zh/vs/google-docs.html | 217 +++++ styles/base.css | 19 + 26 files changed, 2870 insertions(+), 39 deletions(-) create mode 100644 docs/explorations/2026-07-09-seo-geo-traffic-playbook.md create mode 100644 public/home.css create mode 100644 public/ran-tokens.css create mode 100644 public/zh/convert/csv-to-xlsx.html create mode 100644 public/zh/convert/xlsx-to-csv.html create mode 100644 public/zh/no-signup-document-editor.html create mode 100644 public/zh/offline-document-editor.html create mode 100644 public/zh/open/docx.html create mode 100644 public/zh/open/pptx.html create mode 100644 public/zh/open/xlsx.html create mode 100644 public/zh/vs/google-docs.html diff --git a/.prettierignore b/.prettierignore index 8909932a..3489dcdb 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,5 @@ # Generated lockfile — managed by pnpm, not prettier. pnpm-lock.yaml + +# Vendored ranui design-token layer (copied from ranui/dist by bin/build.sh). +public/ran-tokens.css diff --git a/bin/build.sh b/bin/build.sh index 025548cf..afc0fa7f 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -5,6 +5,17 @@ set -e echo "Starting build process..." +# Keep the vendored ranui design-token layer in sync (the landing hero consumes +# its --ran-* variables via public/ran-tokens.css). Re-copy on every build so it +# never drifts from the installed ranui version. +RAN_TOKENS_SRC="node_modules/ranui/dist/ranui.css" +if [ -f "$RAN_TOKENS_SRC" ]; then + cp "$RAN_TOKENS_SRC" public/ran-tokens.css + echo "Synced ranui design tokens -> public/ran-tokens.css" +else + echo "Warning: $RAN_TOKENS_SRC not found, using existing public/ran-tokens.css." +fi + # Run Vite build pnpm vite build diff --git a/docs/explorations/2026-07-09-seo-geo-traffic-playbook.md b/docs/explorations/2026-07-09-seo-geo-traffic-playbook.md new file mode 100644 index 00000000..5ec29bbc --- /dev/null +++ b/docs/explorations/2026-07-09-seo-geo-traffic-playbook.md @@ -0,0 +1,152 @@ +# edit.chaxus.com SEO / GEO 流量经验(哥飞「出海做站」方法论 × 本项目现状) + +> 2026-07-09 + +## 背景 + +首页太素(JS 用户直接进编辑器、可爬正文只有 `