- build.sh:构建源改 ~/docker_apps/blog/build-repo(fetch+reset 硬跟
origin/main,匿名 fetch)——线上=远端 main 确定性闭环,Sveltia 保存
即自动上线生效;stamp 记录构建 commit;node_modules 留仓内做增量
(loader 逻辑变更时须清 node_modules/.astro——EXIF 教训已注)
- en/archives/index.astro 补缺(此前 404):PostList locale 复用 +
译题映射;三级目录 import 深度坑再犯一次(已修)
验证: bash infra/deploy/build.sh → staging 29 html @0e792a7(裸 clone
实测);build 本地 28+1 页;E2E 30/30 PASS
Spec: 2026-10-25_add-blog-5c
Co-authored-by: GLM-5.3
18 lines
650 B
Plaintext
18 lines
650 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} />
|
|
</BaseLayout>
|