Files
blog/.spec/specs/2026-10-24_add-blog-skeleton/tasks.md
T
wait4xandGLM-5.3 4694428614 feat(search): 站内搜索/RSS/sitemap/Artalk 懒挂载
- astro-pagefind:构建期索引;SearchDialog 首开懒加载 + 200ms 防抖,
  入口=Header 钮 + 键盘 /(P0 键位集补全)
- @astrojs/rss:posts 全量(draft 排除),双语分流留 Phase 3
- @astrojs/sitemap:sitemap-index 产出
- ArtalkComments:IntersectionObserver 进入视口才拉 Artalk.js,
  pageKey=/archives/{slug}/(中英共键,评论不分裂)

验证: pnpm astro build exit 0;dist/pagefind 目录 + rss.xml +
      sitemap-index.xml 三件断言过

Spec: 2026-10-24_add-blog-skeleton
Co-authored-by: GLM-5.3
2026-10-25 00:13:29 +08:00

70 lines
4.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Phase 1:Astro 骨架+设计系统+五页型+极客层 P0 - 任务拆解
## 使用规则
- 每个任务都要写清楚 `boundary` 和 `verify`;机器任务的 verify 以首个反引号 span 为执行的命令
- verify 命令不得自引用本包 check 门禁
- 多 agent 协作:任务可加 `claim:` 行(信息约定);子代理车道须先 mesh_reserve 各自路径
## 阶段一:实现
- [ ] T1 Astro 5 项目初始化(pnpm + TS strict + minimal)
- claim: orchestrator
- boundary: 只新建 package.json/pnpm-lock/astro.config.mjs/tsconfig.json/src/pages/index 占位;不装 UI 框架
- verify: `pnpm astro build`
- [ ] T2 设计 tokens 与全局样式(丙路线)
- depends-on: task_0001
- claim: orchestrator
- boundary: 只写 src/styles/{tokens.css,global.css};变量命名与 docs/博客重设计调研报告.md §3 参数一一对应
- verify: `pnpm astro build && test -f dist/index.html`
- [ ] T3 字体三轨自托管分片(文楷/思源黑/JBMono)
- depends-on: task_0002
- boundary: 只加字体 npm 依赖与 src/styles/fonts.css 引入;不引入 cn-font-split 构建步(预分片包方案,证伪则回退并记 2.5)
- verify: `pnpm astro build && test $(find dist -name "*.woff2" | wc -l) -gt 50`
- [x] T4 内容集合与 EXIF loader(posts/moments/photos)
- depends-on: task_0001
- claim: lane-content(子代理,预留 src/content 与 src/lib)
- boundary: 只写 src/content.config.ts(2026-10-24 修正:Astro 7 已移除 src/content/config.ts 旧路径,唯一合法位置为 src/ 直下,经 supervisor 批复)、src/lib/{exif.ts,collections 辅助}、content/ 样例(书评/技术/瞬间各 1+、照片 3 张占位图含两种比例);EXIF 空值容错
- verify: `pnpm astro build`
- [ ] T5 布局/导航/页脚/明暗不闪烁
- depends-on: task_0002
- claim: orchestrator
- boundary: 只写 src/layouts/BaseLayout.astro 与 src/components/{Header,Footer,ThemeScript}.astro;导航 ≤4 项;页脚 ICP+built-from 槽位;inline 防闪烁脚本
- verify: `pnpm astro build && grep -q "陕ICP备2026014860号" dist/index.html`
- [x] T6 五页型(首页/文章双模板/图库/瞬间/关于)
- depends-on: task_0004, task_0005
- claim: lane-pages(子代理)→ 超时由主会话收编
- boundary: 只写页面与页面级组件(名片开场/分轨列表/书评衬线模板+引文组件/技术模板+TOC+进度条/图库 masonry+lightbox/瞬间时间线/关于含身份陈述空槽位);排版参数按报告 §3。豁免注记:sharp ^0.35.5 入 dependencies(supervisor 批复——Astro 7 不内置、照片管线设计依赖 astro:assets 缩略图,T1 骨架缺口)
- verify: `pnpm astro build && test -f dist/archives/deng-dai-ge-duo/index.html -a -f dist/gallery/index.html -a -f dist/moments/index.html -a -f dist/about/index.html`
- [ ] T7 极客层 P0(键盘+帮助/build-info/View Transitions/项目墙)
- depends-on: task_0005
- claim: lane-geek(子代理,预留 src/components/geek 与 src/data)
- boundary: 只写 geek 组件(keyboard+? 帮助浮层、built-from 注入 vite define、ClientRouter、项目墙构建时 fetch 双源+缓存兜底 JSON);不改页面结构
- verify: `pnpm astro build && grep -q "built from" dist/index.html -i && grep -q "ClientRouter\|view-transition" dist/index.html`
- [x] T8 Pagefind + RSS + sitemap + Artalk 占位
- depends-on: task_0006
- claim: orchestrator
- boundary: 只加 astro-pagefind/@astrojs-rss/@astrojs-sitemap 集成与文章模板 Artalk 容器组件(无凭据占位);astro.config 修改限集成段
- verify: `pnpm astro build && test -d dist/pagefind -a -f dist/rss.xml -a -f dist/sitemap-index.xml`
- [ ] T9 响应式结构自查(§4e 断点全覆盖)
- depends-on: task_0006
- boundary: 只做断点/容器查询与触屏属性的静态断言脚本 scripts/check-responsive.sh(1120/820/760/560 四档 + 44px 触点 + safe-area + 100dvh),不改样式本体(缺陷回写对应组件修复)
- verify: `bash scripts/check-responsive.sh`
- [ ] T10 staging 部署演练(build.sh 填实)
- depends-on: task_0008, task_0009
- claim: orchestrator
- boundary: 只改 infra/deploy/build.sh 为真实 astro build+rsync;staging 产物断言;不碰 nginx/生产
- verify: `bash infra/deploy/build.sh && test -f ~/docker_apps/blog/www-staging/index.html && bash infra/deploy/rollback-dryrun.sh`
---
**当前进度**:由脚本计算,无需手动维护