①首页 PostList limit=6 + 「全部文章 →」双轨入口(用户拍板 6 篇) ②/archives 年 <details>(最新年 open,summary「2026 · N 篇」+▸ 自绘 箭头)+ 年内按月分组小标题;零 JS 依赖、内容全在 DOM(SEO 无损)③/books 年折叠(色脊/书封渲染零改动)④E2E +3 断言 (首页≤6+入口/归档 open 唯一+月分组/书架年组不变量) E2E 弦键竞态根治:折叠批的多次导航扰动 g-chords 时序——洁净起 点(先回稳定页)再测弦,测试意图不依赖前序状态,37/37 连跑稳定 车道:op-gitea(lint 43 页 0/0/0);收编复验首页 6 行+入口/归档 1 年开 12 月组/书架年折叠/en 轨全过 验证: E2E 37/37 连跑两次;content-lint 0/0/0;首页/归档/书架/ en 四页 playwright 实测 Spec: none (折叠批,车道级交付) Co-authored-by: GLM-5.3
18 lines
655 B
Plaintext
18 lines
655 B
Plaintext
---
|
|
// /en/archives/ 列表页(补缺:此前 404)
|
|
import { getCollection } from 'astro:content';
|
|
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
|
import PostList from '../../../components/PostList.astro';
|
|
|
|
const posts = (await getCollection('posts', ({ data }) => !data.draft && !data.tags.includes('hidden'))).sort(
|
|
(a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime(),
|
|
);
|
|
const enTitle = Object.fromEntries(
|
|
(await getCollection('postsEn')).map((e) => [e.id, e.data.title]),
|
|
);
|
|
---
|
|
|
|
<BaseLayout title="Posts · wait4x" description="All posts">
|
|
<PostList {posts} locale="en" titleOverrides={enTitle} fold />
|
|
</BaseLayout>
|