feat(cms): 首页四项可配 + 开源页项目可见性 + GitHub README 开篇
- 首页:subtitle(markdown 短文本)|latestPhotos 0-6(0 隐藏)|
perTrackLimit 4-8|sections{tracks,photos,heatmap,projects} 开关,
访问器 homeConfig() 夹取越界值,字段级回落默认(零配置=原形态)
- 开源页项目可见性:mode all|only|exclude + include[]/exclude[] +
sort pinned-first|stars|updated + perSource both|github|gitea;
projects.ts 加 LoadProjectsOptions + arrange()(来源→可见性→排序)
- 开源页开篇支持 GitHub README:intro_from off|github-readme,构建期
取 wait4xx/wait4xx README(token 复用宿主 0600 文件)→ 缓存
content/.github-readme.md 入仓 → renderMarkdown;失败逐级回落
(缓存 → yaml blurb)。实测取到 3117 字符,现状仍 off 待用户开启
- 修既有 bug:orderPinned 内硬 slice(0,6) 把开源页 limit=99 也截到 6 条
→ 移除,开源页恢复全量 16 条
- 文档:写作指南加首页/项目墙两张字段表(含 YAML 1.1 `off` 需加引号坑、
README 行为与外部徽章风险说明)
车道:op-gitea(3/3);收编复验:构建 48 页 + E2E 37/37 + 开源页 16 条 +
首页默认形态(2 轨/热力图/项目墙)无回归
验证: node v26.13.0 构建 48 页 exit 0;E2E 37/37 PASS;playwright 实测
Spec: none (首页与开源页后台扩展,车道级交付)
Co-authored-by: GLM-5.3
This commit is contained in:
1 parent
8d221ab36e
commit
859cac19a2
11 files changed
+387
-26
No files matched your search
+19
-1
@@ -1,9 +1,14 @@
|
||||
# 主页身份语(后台「页面文案 → 主页设置」可改)
|
||||
# zh/en 双字段,页面按 locale 取;留空则回落到 src/lib/site-content.ts 的默认文案
|
||||
# 全部字段留空 = 现有形态(字段级回落默认值,零配置零变化)
|
||||
tagline:
|
||||
zh: 写作者 · 读者 · 快门按压者,拥抱开源。
|
||||
en: Writer · Reader · Shutter-presser — embracing open source.
|
||||
|
||||
# 副标题(可选,markdown 短文本):渲染在身份语下方,留空不渲染
|
||||
# subtitle:
|
||||
# zh: '正在把**阅读、代码与影像**收进同一个工作台'
|
||||
# en: 'Collecting **reading, code and images** into one workbench'
|
||||
|
||||
# 头像(可选):上传后自动写入 ./assets/avatar-xxx.jpg(走 Astro 图片管线)
|
||||
# 留空 = 回退内置渐变占位
|
||||
# avatar: ./assets/avatar.jpg
|
||||
@@ -24,3 +29,16 @@ socials:
|
||||
- label: 邮件
|
||||
url: mailto:admin@wait4x.online
|
||||
icon: email
|
||||
|
||||
# 最新影像张数(1-6,默认 4;填 0 = 隐藏该区块)
|
||||
latestPhotos: 4
|
||||
|
||||
# 首页每轨文章条数(4-8,默认 6)
|
||||
perTrackLimit: 6
|
||||
|
||||
# 区块开关(默认全开;关掉的区块不渲染)
|
||||
sections:
|
||||
tracks: true
|
||||
photos: true
|
||||
heatmap: true
|
||||
projects: true
|
||||
@@ -6,3 +6,17 @@ repo_label: git.wait4x.online/wait4x/blog
|
||||
blurb_after:
|
||||
zh: —— Astro SSG、双写作流、构建发布全链皆在仓中。以下是我在自托管 gitea 与 GitHub 上的全部公开仓库,以及最近一年的贡献活动。
|
||||
en: — the Astro SSG, dual-writing workflow, and the full build & deploy pipeline live in the repo. Below are all my public repositories on self-hosted gitea and GitHub, plus contributions from the past year.
|
||||
|
||||
# ---- 项目墙可见性与排序(后台「开源页」可改;留空/缺省 = 现状) ----
|
||||
# mode: all=全部(默认) | only=仅 include 列出 | exclude=排除 exclude 列出
|
||||
mode: all
|
||||
# 白名单(mode=only 时生效)
|
||||
include: []
|
||||
# 黑名单(mode=exclude 时生效)
|
||||
exclude: []
|
||||
# 排序:pinned-first=置顶优先(默认) | stars=星数降序 | updated=最近更新
|
||||
sort: pinned-first
|
||||
# 来源过滤:both=双源合并(默认) | github | gitea
|
||||
perSource: both
|
||||
# 开篇文案来源:off=用本文件 blurb(默认) | github-readme=构建期取 wait4xx/wait4xx 的 README 渲染
|
||||
intro_from: "off"
|
||||
Reference in new issue
Block a user