Files
blog/public/admin/config.yml
T
wait4xandGLM-5.3 40346c3f21 fix(books): 泥潭策展语与回退契约实现;自托管仓星标语义
- BooksPage 实现 schema 注释承诺的 description 回退(正文首段去记号
  取 60 字)——视觉复核抓到的"文档说了代码没做"缺口
- 泥潭补人工策展语(回退之上);自托管仓星标改 self-hosted 徽标
  (gitea 无 star 真值,★0 语义突兀——视觉复核次要备注)

验证: build 28 页 exit 0;dist/books 含泥潭策展语;dist/opensource
      self-hosted 徽标与 ★57 并存实测

Spec: 2026-10-25_add-terminal-books-admin

Co-authored-by: GLM-5.3
2026-10-25 13:46:56 +08:00

45 lines
2.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:
- 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: 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 }