perf(build): 按页字体 CSS 子集化 + gallery 响应式图片阶梯

- subset-font-css.mjs post-build:扫每页文本(含 attr)+ ui.ts 全
  词条 + Latin/标点永保三防线,命中 unicode-range 才留 @font-face,
  子集按内容哈希去重共享,孤儿原 CSS 清出——全站字体 CSS 6.7→2.6MB
  (61%),mian-sha 声明 101→48/家族
- build.sh 挂载(存在性守卫:车道在途文件不断发布链——20:31 事故
  纪律)
- GalleryPage srcset 阶梯 320/560/720→480/800/1200(首图
  fetchpriority 维持)
- Lighthouse:mian-sha 61→78、gallery 74→79、en 70→83、terminal
  74→88(A11y/BP/SEO 持平;unused-css 370→36KB)
- 过程坑:v1 重写 href 丢前导斜杠致嵌套页 404——v2 只换文件名

车道:op-gitea(A/B 渲染等价证明:serif 916 字 0-miss;分数复采
入 /tmp/e2e-shots/lighthouse-ap/);收编验收:serif 字形
fonts.check 实测 true、srcset 产出、E2E 31/31

验证: pnpm astro build + subset 跑通 35 页;E2E 31/31 PASS;
      staging 部署后 stamp 复核

Spec: none (构建管线性能二连:post-build 子集化+图片阶梯)

Co-authored-by: GLM-5.3
This commit is contained in:
wait4xandGLM-5.3 committed 2026-10-25 21:05:15 +08:00
1 parent aa050d8035
commit 1fdd0cc162
3 files changed
+149 -1

No files matched your search

+1 -1
View File
@@ -101,7 +101,7 @@ const first = cards[0];
<Image
src={card.image}
alt={card.alt}
widths={[320, 560, 720]}
widths={[480, 800, 1200]}
sizes="(min-width: 820px) 30vw, 46vw"
loading={i < 3 ? 'eager' : 'lazy'}
fetchpriority={i < 3 ? 'high' : undefined}