chore(spec): 归档 blog-5n——八任务收敛(后台深度优化全家桶)

Spec: 2026-11-05_blog-5n-admin-deep-optimization

Co-authored-by: GLM-5.3
This commit is contained in:
wait4xandGLM-5.3 committed 2026-11-05 20:13:09 +08:00
1 parent a555a3e450
commit 5c0e6ed900
29 files changed
+1559 -512

No files matched your search

+64 -76
View File
@@ -24,6 +24,7 @@ collections:
label_singular: 文章
folder: content/posts
create: true
hint: 新文章可从置顶的《写作模板》复制起手(列表打开模板 → ⋯ 菜单 → Duplicate);英文版构建时自动机翻上线,无需在此维护
# 中文主稿;英文为 TMT 预翻译入仓的 .en.md(posts-en 集合不在后台,防误改译文)
slug: '{{slug}}'
summary: '{{pubDate}} · {{title}}'
@@ -34,14 +35,14 @@ collections:
media_folder: assets
public_folder: ./assets
fields:
- { label: 标题, name: title, widget: string }
- { label: 标题, name: title, widget: string, hint: '建议 ≤32 字(搜索结果超长会截断)' }
- { label: 日期, name: pubDate, widget: datetime, date_format: 'YYYY-MM-DD', time_format: false, format: 'YYYY-MM-DD' }
- { label: 分轨, name: category, widget: select, options: [{label: 阅读, value: reading}, {label: 技术, value: tech}, {label: 照片, value: photo}] }
- { label: 标签, name: tags, widget: list, required: true, hint: '至少一个(可写 read/写作/站点更新等);schema 必填,漏了构建会拦' }
- { label: 标签, name: tags, widget: list, required: true, hint: '至少一个;优先复用现有标签:read(书评)/ 写作 / 站点更新——避免同义新造(如 阅读/read 分家);schema 必填,漏了构建会拦' }
- { label: 置顶, name: pinned, widget: boolean, required: false, default: false, hint: '置顶文章排在首页/归档/书架最前;只影响顺序,不改日期、URL 与 RSS 时间语义' }
- { label: 情绪色(书评色脊), name: mood, widget: color, required: false, hint: '#RRGGBB,仅阅读轨使用' }
- { label: 原书作者, name: bookAuthor, widget: string, required: false }
- { label: 一句话描述(书架策展语), name: description, widget: text, required: false }
- { label: 一句话描述(书架策展语), name: description, widget: text, required: false, hint: '60–120 字最佳(搜索摘要与列表导语共用)' }
- { label: 书封图, name: cover, widget: image, required: false, hint: '上传后自动生成,无需手填路径;仅阅读轨展示' }
- label: 附视频(可选)
name: video
@@ -108,7 +109,7 @@ collections:
widget: markdown
required: false
hint: '与图片至少填一项。支持 markdown 与排版类 HTML,例如 <span class="c-blue font-kai">彩色+楷体</span>;选中文字 → Insert ▸ 排版 可视化选字体/颜色(预览窗格直接显色显字体)。装饰色仍守“外壳灰阶、彩色只作强调”的纪律'
- { label: 图片, name: image, widget: image, required: false, hint: '与文字至少填一项;建议先压缩' }
- { label: 图片, name: image, widget: image, required: false, hint: '与文字至少填一项;上传后构建自动优化(WebP),原图无需手工压缩' }
- label: 标签
name: tags
widget: list
@@ -185,96 +186,82 @@ collections:
media_folder: assets
public_folder: ./assets
fields:
- label: 身份语
name: tagline
- label: 身份名片
name: identity
widget: object
required: false
hint: 首页大字身份语(双语,markdown 富文本);可写 <span class="font-kai c-blue">…</span> 做局部强调
collapsed: true
hint: 头像、身份语、副标题与站点图标(首页名片区 + 浏览器标签图标)
fields:
- { label: 中文, name: zh, widget: string, required: false }
- { label: 英文, name: en, widget: string, required: false }
- label: 页面排版覆盖(可选)
name: typography
- { label: 身份语(中文), name: tagline_zh, widget: string, required: false, hint: '首页大字身份语(markdown 富文本);可写 <span class="font-kai c-blue">…</span> 做局部强调' }
- { label: 身份语(英文), name: tagline_en, widget: string, required: false }
- { label: 副标题(中文,markdown 短文本), name: subtitle_zh, widget: string, required: false, hint: '渲染在身份语下方;留空不渲染' }
- { label: 副标题(英文), name: subtitle_en, widget: string, required: false }
- label: 头像(可选)
name: avatar
widget: image
required: false
hint: '留空 = 内置渐变占位;上传后自动优化为 60px WebP'
- label: 站点图标 favicon
name: favicon
widget: image
required: false
# media_folder 按 file 集合语义相对 content/site/ 解析(写 content/site/assets 会嵌套翻倍——5l 实测教训)
media_folder: ../../public/icons
public_folder: /icons
hint: '直接上传 .svg/.ico/.png(建议 64–512px 方图);留空回退 /favicon.svg'
- label: 文案与排版
name: copy
widget: object
required: false
hint: 本页正文默认字体 / 强调色 / 字号缩放(0.8–1.25);不填用全站默认,只影响本页
collapsed: true
hint: 公告(渲染在名片区下方,留空不显示)+ 页面排版覆盖(本页正文默认字体/强调色/字号缩放,不填用全站默认,只影响主页)
fields:
- { label: 公告(中文,markdown), name: announcement_zh, widget: markdown, required: false, hint: '渲染在名片区下方;留空则不显示公告块' }
- { label: 公告(英文), name: announcement_en, widget: markdown, required: false }
- label: 正文字体类
name: font
name: typography_font
widget: select
required: false
hint: 整页正文换字族;艺术/展示类字族体积大。5i 新增六款(小薇/庆科黄油/马善政/柳建毛草/得意黑/新晰黑)均按站内用字切片,单页增量 27–46KB;站外用字(生僻字)会回落系统字族,需按 docs 里的命令重切
options: [font-serif, font-kai, font-sans, font-mono, font-song, font-kai-sys, font-hei-sys, font-fangsong, font-huiwen, font-kuaile, font-xiaowei, font-huangyou, font-mashanzheng, font-liujianmaocao, font-smiley, font-neoxihei]
- label: 强调色类
name: accent
name: typography_accent
widget: select
required: false
options: [ink-accent, ink-accent-soft, c-blue, c-blue-soft, c-teal, c-teal-soft, c-green, c-green-soft, c-yellow, c-yellow-soft, c-orange, c-orange-soft, c-red, c-red-soft, c-pink, c-pink-soft, c-purple, c-purple-soft]
- { label: 字号缩放, name: scale, widget: number, required: false, value_type: float, min: 0.8, max: 1.25, step: 0.05, hint: '0.8–1.25;1 = 全站默认' }
- label: 公告(可选,markdown)
name: announcement
- { label: 字号缩放, name: typography_scale, widget: number, required: false, value_type: float, min: 0.8, max: 1.25, step: 0.05, hint: '0.8–1.25;1 = 全站默认' }
- label: 内容与开关
name: content
widget: object
required: false
hint: 渲染在名片区下方;留空则不显示公告块
collapsed: true
hint: 各区块条数与显隐开关;关掉的区块不渲染,越界数值自动夹取(默认 = 现状)
fields:
- { label: 中文, name: zh, widget: markdown, required: false }
- { label: 英文, name: en, widget: markdown, required: false }
- { label: 项目墙条数, name: projectsLimit, widget: number, required: false, value_type: int, min: 1, max: 99, hint: '首页项目墙显示几条(1–99,缺省 6)' }
- label: 轨细分开关(首页文章列表)
name: postsTracks
widget: object
required: false
hint: 关掉某轨则该轨文章不在首页列出(全开=现状)
fields:
- { label: 阅读轨, name: reading, widget: boolean, required: false, default: true }
- { label: 技术轨, name: tech, widget: boolean, required: false, default: true }
- { label: 照片轨, name: photo, widget: boolean, required: false, default: true }
- label: 副标题(可选,markdown 短文本)
name: subtitle
widget: object
hint: 渲染在身份语下方;留空不渲染
fields:
- { label: 中文, name: zh, widget: string, required: false }
- { label: 英文, name: en, widget: string, required: false }
- label: 最新影像张数
name: latestPhotos
widget: number
required: false
default: 4
min: 0
max: 6
hint: '1-6;填 0 = 隐藏「最新影像」区块。留空默认 4'
- label: 首页每轨文章条数
name: perTrackLimit
widget: number
required: false
default: 6
min: 4
max: 8
hint: 阅读轨/技术轨各显示条数,留空默认 6
- label: 区块开关
name: sections
widget: object
required: false
hint: 关掉的区块不渲染(默认全开)
fields:
- { label: 文章列表, name: tracks, widget: boolean, required: false, default: true }
- { label: 最新影像, name: photos, widget: boolean, required: false, default: true }
- { label: 贡献热力图, name: heatmap, widget: boolean, required: false, default: true }
- { label: 项目墙, name: projects, widget: boolean, required: false, default: true }
- label: 头像(可选)
name: avatar
widget: image
required: false
hint: '留空 = 内置渐变占位;上传后自动优化为 60px WebP'
- label: 站点图标 favicon
name: favicon
widget: image
required: false
# media_folder 按 file 集合语义相对 content/site/ 解析(写 content/site/assets 会嵌套翻倍——5l 实测教训)
media_folder: ../../public/icons
public_folder: /icons
hint: '直接上传 .svg/.ico/.png(建议 64–512px 方图);留空回退 /favicon.svg'
- label: 最新影像张数
name: latestPhotos
widget: number
required: false
default: 4
min: 0
max: 6
hint: '1-6;填 0 = 隐藏「最新影像」区块。留空默认 4'
- label: 首页每轨文章条数
name: perTrackLimit
widget: number
required: false
default: 6
min: 4
max: 8
hint: 阅读轨/技术轨各显示条数,留空默认 6
- { label: 项目墙条数, name: projectsLimit, widget: number, required: false, value_type: int, min: 1, max: 99, hint: '首页项目墙显示几条(1–99,缺省 6)' }
- { label: 阅读轨, name: postsTracks_reading, widget: boolean, required: false, default: true, hint: '关掉则阅读轨文章不在首页列出(归档页仍可见);三轨全开 = 现状' }
- { label: 技术轨, name: postsTracks_tech, widget: boolean, required: false, default: true }
- { label: 照片轨, name: postsTracks_photo, widget: boolean, required: false, default: true }
- { label: 显示文章列表, name: sections_tracks, widget: boolean, required: false, default: true }
- { label: 显示最新影像, name: sections_photos, widget: boolean, required: false, default: true }
- { label: 显示贡献热力图, name: sections_heatmap, widget: boolean, required: false, default: true }
- { label: 显示项目墙, name: sections_projects, widget: boolean, required: false, default: true }
- label: 社交链接(顺序即展示顺序)
name: socials
widget: list
@@ -289,6 +276,7 @@ collections:
required: false
options: [github, rss, email, bilibili, x]
hint: '不在列表里的留空 → 显示纯文字按钮'
- name: about
label: 关于页
file: content/site/about.yaml