feat(deploy): 裸 clone 构建改造与 en/archives 补页(T1/T4)
- 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
This commit is contained in:
1 parent
ad5f9d3d95
commit
f8add5ad15
5 files changed
+153
-9
No files matched your search
@@ -0,0 +1,17 @@
|
||||
---
|
||||
// /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>
|
||||
Reference in new issue
Block a user