Files
blog/public/admin/config.yml
T
wait4xandGLM-5.3 d8997c3c72 feat(gallery): 灯箱 v2 收编——caption 字段全链+21 条视觉轨拟稿
schema caption?:string(人为描述,注释区别 alt 无障碍语义)+
Sveltia textarea 字段+21 条 json 全量上稿(视觉轨看图代拟策展
语气,用户可后台逐条改);GalleryPage 灯箱重构与缩放交互已随
44626f8/54769bc 入库,本笔补数据面。

车道:op-artalk(专项 8/8+E2E 34/34);视觉复核三问 PASS
(舞台纯净/meta 分层/caption 策展语气),唯一需修点=放大态
caption 遮挡→v2.1 ③ zoom 自动隐层已立项在治

验证: E2E 34/34;caption 渲染实测「落日把海与城一齐烫成金
箔…」;content-lint 0/0/0;schema 过构建

Spec: none (灯箱 v2 数据面收编,交互面已在库)

Co-authored-by: GLM-5.3
2026-11-01 12:51:20 +08:00

62 lines
3.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json
# Sveltia CMS 配置(T3 试水):仅 photos 集合,见 docs 预研报告
# 纪律:不开内建图片优化(transformations 会把原图转 webp 抹掉 EXIF,构建期提取报废)
backend:
name: gitea
repo: wait4x/blog
branch: main
base_url: https://git.wait4x.online
api_root: https://git.wait4x.online/api/v1
media_folder: content/photos
site_url: https://wait4x.online
output:
# Astro zod optional 兼容:空可选字段不写文件(官方 Astro 指南建议)
omit_empty_optional_fields: true
collections:
# 瞬间:随手发(text/image 至少其一——Sveltia 无法表达条件必填,两者都设可选,
# 保存前自查;pubDate 必填)。图片走图库媒体库(content/photos 同源可复用)
- name: moments
label: 瞬间
folder: content/moments
create: true
slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
summary: '{{fields.pubDate}} · {{fields.text}}'
fields:
- { label: 时间, name: pubDate, widget: datetime, date_format: 'YYYY-MM-DD', time_format: false, format: 'YYYY-MM-DD' }
- { label: 文字, name: text, widget: text, required: false, hint: '一句话(与图片至少填一项)' }
- { label: 图片, name: image, widget: image, required: false, hint: '与文字至少填一项;建议先压缩' }
- label: 标签
name: tags
widget: list
required: false
- name: photos
label: 图库照片
folder: content/photos
# 整文件 JSON(非 frontmatter)= 现有 sidecar 同构;不设 format 条目不列出
format: json
create: true
# 入口相对:jpg 与 sidecar 同目录;image 引用写裸文件名(loader new URL 等价解析)
media_folder: ''
public_folder: ''
summary: '{{fields.group}} · {{fields.title}}'
fields:
# title 必填:Astro schema z.string() 无 .optional(),omit 纪律下必需且有值才会落键(空 title 会让 main 不可构建)
- { label: 标题, name: title, widget: string, required: true }
- { label: 图片, name: image, widget: image }
- { label: 分组, name: group, widget: select, options: [street, landscape] }
- { label: 替代文本, name: alt, widget: string, required: false }
- { label: 人为描述, name: caption, widget: text, required: false, hint: 展示在灯箱里的人为描述(一句话策展文案) }
- label: EXIF 覆盖(一般留空,构建期自动从图提取)
name: exif
widget: object
required: false
fields:
- { label: 机身, name: make, widget: string, required: false }
- { label: 镜头, name: lens, widget: string, required: false }
- { label: 光圈值, name: fNumber, widget: number, required: false }
- { label: 曝光秒, name: exposureTime, widget: number, required: false }
- { label: ISO, name: iso, widget: number, required: false }