Skip to content

Commit 1a277fe

Browse files
mirror29claude
andcommitted
fix(web): 修正 GEO 页面元数据与静态发现入口
将首页 schema 收敛到首页、移除失真的站内搜索声明,并用可测试的静态产物合同保护 sitemap、robots、llms.txt 与页面索引边界。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8d05854 commit 1a277fe

19 files changed

Lines changed: 1136 additions & 348 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
run: pnpm test
4848

4949
web-typecheck:
50-
name: web · typecheck + build
50+
name: web · typecheck + test + build
5151
runs-on: ubuntu-latest
5252
defaults:
5353
run:
@@ -56,7 +56,7 @@ jobs:
5656
- uses: actions/checkout@v4
5757
- uses: pnpm/action-setup@v4
5858
with:
59-
version: 11
59+
version: 11.1.2
6060
- uses: actions/setup-node@v4
6161
with:
6262
node-version: "22"
@@ -66,8 +66,12 @@ jobs:
6666
run: pnpm install --frozen-lockfile
6767
- name: Type check
6868
run: pnpm typecheck
69+
- name: Unit tests
70+
run: pnpm test
6971
- name: Static export build
7072
run: pnpm build
73+
- name: Static export checks
74+
run: pnpm test:export
7175

7276
dashboard-typecheck:
7377
name: dashboard · typecheck + build

apps/web/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ pnpm i
1212
pnpm dev # http://localhost:3000
1313
```
1414

15-
## 构建 / 类型检查
15+
## 构建 / 类型检查 / 测试
1616

1717
```bash
1818
pnpm typecheck
19+
pnpm test
1920
pnpm build
21+
pnpm test:export
2022
```
2123

2224
## 结构
@@ -34,7 +36,7 @@ dark quant 终端调,色板见 `src/app/globals.css` 的 `@theme`:
3436

3537
## 部署
3638

37-
Cloudflare Pages → GitHub repo `mirror29/inalpha` → root directory `apps/web` → build `pnpm build` → output `.next`。绑域名 `inalpha.dev`
39+
Cloudflare Pages → GitHub repo `mirror29/inalpha` → root directory `apps/web` → build `pnpm build` → output `out`。绑域名 `inalpha.dev`
3840

3941
### 环境变量
4042

apps/web/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"dev": "next dev",
1414
"build": "next build",
1515
"start": "next start",
16+
"test": "vitest run src",
17+
"test:export": "node --test tests/export-seo.test.mjs",
1618
"typecheck": "tsc --noEmit"
1719
},
1820
"dependencies": {
@@ -35,6 +37,7 @@
3537
"postcss": "^8.5.15",
3638
"tailwindcss": "^4.3.0",
3739
"typescript": "^6.0.3",
40+
"vitest": "^4.1.0",
3841
"wrangler": "^4.94.0"
3942
}
4043
}

0 commit comments

Comments
 (0)