Language: English | 中文
Before pushing master to GitHub Pages, complete the items below in order.
Each section links to a detailed guide. The placeholder constants in
index_en.html flagged with PASTE_... must be replaced or the feature
silently no-ops.
- Order of operations
- Placeholders to replace
- Smoke test (recommended — do once after every deploy)
- Repo-local hooks & scripts
- If something breaks
- Contact for this checklist
Cross-refs:
- Roadmap for all manual setup items:
../PLAN.mdHorizonH2.M1. - Per-change audit log:
../UPDATES.md. - Detailed guides in this folder:
local-dev.md— run the site locally (CORS / locale URLs / welcome debug).form-backend-google-sheets.md— welcome form backend.analytics-clarity.md— cookie-less Clarity.analytics-backup.md— weekly Clarity backup via GH Actions.security-headers.md— CSP and related meta tags.
| # | Task | Time | Blocks | Detail |
|---|---|---|---|---|
| 1 | Create Google Sheet + Apps Script Web App, paste URL | ~10 min | welcome form | form-backend-google-sheets.md |
| 2 | Create Clarity project, paste project id, enable cookie-less mode | ~5 min | analytics | analytics-clarity.md |
| 3 | Enable .githooks/pre-commit (once per clone) |
10 s | i18n safety | git config core.hooksPath .githooks (see CLAUDE.md) |
| 4 | Add CLARITY_API_TOKEN repo secret + enable Actions write perms |
~5 min | weekly backup | analytics-backup.md |
| 5 | Skim CSP directives; add new CDN origins if you embed new services later | — | any new 3rd-party | security-headers.md |
Search the two files below for each literal string. Both must be replaced with real values before the corresponding feature works.
| Placeholder | File | Replace with | From |
|---|---|---|---|
PASTE_YOUR_APPS_SCRIPT_WEB_APP_URL_HERE |
js/main.js (~line 282) |
GAS Web App URL (looks like https://script.google.com/macros/s/.../exec) |
Step 1 |
PASTE_CLARITY_PROJECT_ID |
index_en.html (end of <body>) |
10-char Clarity project id | Step 2 |
Optional (only if using the weekly backup workflow):
- GitHub repo → Settings → Secrets and variables → Actions → add
CLARITY_API_TOKENfrom the Clarity dashboard.
- Load the live site, open DevTools Console — no
Refused to …CSP errors, no 400s from Clarity (if step 2 done). - Clear
localStorage.hasVisitedBefore→ reload → fill the postcard → submit → within a few seconds your Google Sheet has a new row. - Resize to 375 px width → hamburger icon appears → tap opens the drawer.
- Cycle all 4 themes (AI / Academic / Industrial / Fancy) — welcome postcard adapts to each.
- Switch language (EN/中/FR/DE) — all strings update, no visible English stragglers in non-English locales.
| File | Purpose |
|---|---|
.githooks/pre-commit |
Runs scripts/check_i18n_parity.py if any locales/*.json is staged; blocks commit on key divergence. |
scripts/check_i18n_parity.py |
EN is the baseline; zh/fr/de must have the same key tree. |
scripts/welcome-form-backend.gs |
Apps Script template (paste into Sheets → Extensions → Apps Script). |
scripts/fetch_clarity.py |
Called by the weekly GH Actions workflow — no manual run needed. |
.github/workflows/backup-analytics.yml |
Weekly cron that commits Clarity snapshots to data/analytics/. |
- Form submits but no row in Sheet → Apps Script deployment cached; go to Deploy → Manage deployments → New version.
- CSP error in console → add the offending origin to the matching directive
in the
<meta http-equiv="Content-Security-Policy">tag at the top ofindex_en.html. See security-headers.md. git pushfails → you probably skippedcore.hooksPath .githooksonce, so the pre-commit hook didn't fire on an earlier commit; re-enable it withgit config core.hooksPath .githooks.
If any step above stops matching the actual dashboards (Clarity, Apps Script,
GitHub UI) — those services reshuffle UI every few months — just update the
relevant file in setup/ and commit.