Skip to content

feat: fix blog index shell layout and clean build warnings - #73

Merged
wutongyuonce merged 8 commits into
mainfrom
codex/fixed-shell-layout
Sep 20, 2026
Merged

wutongyuonce merged 8 commits into
mainfrom
codex/fixed-shell-layout

Conversation

@wutongyuonce

@wutongyuonce wutongyuonce commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Summary

完成博客索引壳层与侧栏行为的收尾,并统一文章元数据和资源约定;同时清理已停用的 Insights 与旧列表入口,修复本次 review 发现的路由、生命周期和 RSS 边界问题。

Changes

Layout and sidebar

  • 完善 BlogIndexLayout:宽屏下侧栏随内容滚动,空间不足时锁定在视口底部;用 ResizeObserver、滚动和窗口尺寸变化更新位置,页面切换时释放监听与样式。
  • 将顶栏、索引布局、侧栏、搜索面板等跨页面样式放到 public/shell.css,保证硬刷新和 Astro ClientRouter 导航后的样式一致;保留侧栏近期文章的紧凑样式。
  • 缺少顶栏或底部测量值时不锁定侧栏;底部留白按原计算值的约 2/3 收缩,并保留最小间距。
  • 补充站点顶栏识别标记;修正文章详情页返回首页的目标。

Blog list and content contract

  • 每页文章数从 6 调整为 7,并同步 README、项目解析文档和分页测试。
  • category 改为必填非空字符串;移除旧 cover / coverAlt 字段和展示 fallback,统一使用 titleImage / titleImageAlt
  • 为现有文章补齐分类并迁移封面元数据;移动 Antifragile 封面,新增夜灯封面,修复 Frontend 文章中的图片路径。
  • 新增 Maka PR #5308 外部会话导入文章;重命名 KV Cache 文章文件;清理未使用的 Insights collection/schema/view/helpers、旧 PostCover 组件、无效高亮语言和未使用的 UnoCSS shortcut。
  • 删除旧 /blogs/ 索引/跳转入口;文章详情仍使用 /blogs/[slug]/

Review edge cases

  • 关于页为 tab/panel 使用稳定且唯一的 DOM ID;处理非法 URL fragment,保留 history state,支持方向键、Home、End,并避免重复绑定事件。
  • 标签页切换时清除 debounce 定时器和 popstate 监听,避免每次访问累积旧 DOM 引用。
  • 侧栏近期文章与 RSS 遵循文章的 redirect;RSS 对路径段编码并转义 XML,同时保留稳定的站内文章 GUID。
  • 友链复制按钮处理连续点击和异步结果乱序,避免旧计时器提前清除最新状态。

Docs and checks

  • 同步中英文 README、项目解析、SEO/RSS 文档及内容发布 skill;内容校验脚本要求 category 并移除旧封面字段规则。
  • 增加侧栏边界和 RSS 编码/转义的测试用例及对应 package scripts。

Validation

  • 最新提交 d052f44 的 GitHub CI:pnpm checkpnpm build 均通过。
  • Vercel Preview 与 Preview Comments 检查通过。
  • 本地 scoped Prettier 与 git diff --check 通过。
  • pnpm test:blog-sidebarpnpm test:rss-feed 已加入/更新,但未在最新提交后运行。

@vercel

vercel Bot commented Sep 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
wutong-yu-blog Ready Ready Preview Sep 20, 2026 6:58pm UTC

@wutongyuonce
wutongyuonce merged commit b55d38f into main Sep 20, 2026
3 checks passed
@wutongyuonce
wutongyuonce deleted the codex/fixed-shell-layout branch September 20, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant