fix(cms): 页面文案可编辑性修复(结构压平)+ 样式旋钮退役 + favicon 直传
用户实测「瞬间/书架 说明文字」在后台无法编辑。根因:Sveltia 对「可选对象 嵌套可选对象」的子编辑器渲染缺陷线(sveltia-cms #446/#654,双层嵌套正踩 雷区)——压平为单层可选对象 + markdown 直挂,与已验证可编辑的主页/关于 页同构。顺应用户第二问:样式旋钮(字号/颜色/字体三档)整体退役,排版 并入内联类(Insert▸排版,预览直接可见),视觉基线由 .page-note scoped 样式承载(13px/ink-4,与原默认一致零回归);favicon 从贴路径 string 改为 image 直传(落 public/icons/,yaml 存 /icons/…)。 验证: pnpm astro build exit 0;config-check 226 字段全过;content-lint 53 页 0/0/0;E2E 61/61 Spec: none (用户实测报告的后台编辑 bug 紧急修复) Co-authored-by: GLM-5.3
This commit is contained in:
1 parent
cf331ccf3d
commit
eb5e3f851e
6 files changed
+37
-132
No files matched your search
+12
-56
@@ -154,69 +154,22 @@ collections:
|
||||
label: 瞬间 / 书架 标题下的说明
|
||||
file: content/site/pages.yaml
|
||||
format: yaml
|
||||
hint: 这两页大标题下面那一行字,文字与样式都在这里改
|
||||
hint: 这两页大标题下面那一行字的文字;字体/颜色用编辑器 Insert ▸ 排版 内联标注(预览直接可见)
|
||||
fields:
|
||||
- label: 瞬间页
|
||||
- label: 瞬间页说明
|
||||
name: moments
|
||||
widget: object
|
||||
required: false
|
||||
fields:
|
||||
- label: 说明文字
|
||||
name: note
|
||||
widget: object
|
||||
required: false
|
||||
hint: 支持 markdown 与排版类(字体/颜色)
|
||||
fields:
|
||||
- { label: 中文, name: zh, widget: markdown, required: false }
|
||||
- { label: English, name: en, widget: markdown, required: false }
|
||||
- label: 样式
|
||||
name: style
|
||||
widget: object
|
||||
required: false
|
||||
hint: 留空用全站默认;越界值会被自动夹取(不会破版)
|
||||
fields:
|
||||
- { label: 字号(px,11–16), name: size, widget: number, required: false, value_type: int, min: 11, max: 16 }
|
||||
- label: 颜色
|
||||
name: color
|
||||
widget: select
|
||||
required: false
|
||||
hint: 只开放灰阶层级,避免正文被染色
|
||||
options: [ink-1, ink-2, ink-3, ink-4]
|
||||
- label: 字体
|
||||
name: font
|
||||
widget: select
|
||||
required: false
|
||||
options: [font-sans, font-serif, font-kai, font-huiwen, font-kuaile, font-xiaowei, font-huangyou, font-mashanzheng, font-liujianmaocao, font-smiley, font-neoxihei]
|
||||
- label: 书架页
|
||||
- { label: 中文, name: note_zh, widget: markdown, required: false, hint: '一行小字;排版(字体/颜色)选中文字 → Insert ▸ 排版' }
|
||||
- { label: English, name: note_en, widget: markdown, required: false }
|
||||
- label: 书架页说明
|
||||
name: books
|
||||
widget: object
|
||||
required: false
|
||||
fields:
|
||||
- label: 说明文字
|
||||
name: note
|
||||
widget: object
|
||||
required: false
|
||||
hint: 支持 markdown 与排版类(字体/颜色)
|
||||
fields:
|
||||
- { label: 中文, name: zh, widget: markdown, required: false }
|
||||
- { label: English, name: en, widget: markdown, required: false }
|
||||
- label: 样式
|
||||
name: style
|
||||
widget: object
|
||||
required: false
|
||||
hint: 留空用全站默认;越界值会被自动夹取(不会破版)
|
||||
fields:
|
||||
- { label: 字号(px,11–16), name: size, widget: number, required: false, value_type: int, min: 11, max: 16 }
|
||||
- label: 颜色
|
||||
name: color
|
||||
widget: select
|
||||
required: false
|
||||
options: [ink-1, ink-2, ink-3, ink-4]
|
||||
- label: 字体
|
||||
name: font
|
||||
widget: select
|
||||
required: false
|
||||
options: [font-sans, font-serif, font-kai, font-huiwen, font-kuaile, font-xiaowei, font-huangyou, font-mashanzheng, font-liujianmaocao, font-smiley, font-neoxihei]
|
||||
- { label: 中文, name: note_zh, widget: markdown, required: false, hint: '一行小字;排版(字体/颜色)选中文字 → Insert ▸ 排版' }
|
||||
- { label: English, name: note_en, widget: markdown, required: false }
|
||||
- name: home
|
||||
label: 主页设置
|
||||
file: content/site/home.yaml
|
||||
@@ -309,9 +262,12 @@ collections:
|
||||
hint: '留空 = 内置渐变占位;上传后自动优化为 60px WebP'
|
||||
- label: 站点图标 favicon
|
||||
name: favicon
|
||||
widget: string
|
||||
widget: image
|
||||
required: false
|
||||
hint: 'public 下的路径,如 /icons/my.ico 或 /icons/my.svg;留空回退 /favicon.svg。经「图标」媒体库上传'
|
||||
# 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: socials
|
||||
widget: list
|
||||
|
||||
Reference in new issue
Block a user