Scribe

更新日志

scribe-cms 版本说明 — 每个版本是一篇内容文档,全部显示在此页。

v0.0.23

Added

  • Create and edit entries from the studio: forms are generated from each content type's schema, with widgets for every field kind, inline validation errors, and slug auto-derivation. Every save is a plain file write, so a studio session reads like a hand edit in git
  • Image uploads in entry forms: files land exactly where the config says (templated {slug} destinations or the field's directory), with format and size limits enforced. Nothing is ever converted behind your back
  • Multiple asset fields: field.asset({ multiple: true }) attaches an ordered gallery of images to one entry, validated per element and covered by deletion planning and orphan detection
  • Field help text: Zod's .describe("...") on any field shows up as help text in the studio inspector and entry forms
  • Searchable relation pickers: long relation lists get a filter box with a live match count

Changed

  • The studio is now content-first: the home page shows your content types with entry counts, validation badges, and New buttons; translation dashboards live under a single Translations section, and per-entry translation status moved to a tab on the entry inspector. Old URLs redirect
  • New entries are always created as .mdx; existing .md files stay fully readable and editable

Fixed

  • .describe() on asset and relation fields no longer strips their field metadata
  • The studio's YAML editor uses js-yaml's safe schema, so YAML type tags cannot execute code

v0.0.22

涵盖 0.0.19 至 0.0.22 版本。

新增功能

  • 内联正文令牌:直接在 MDX 文本中嵌入指向其他文档的本地化链接、资源 URL、前言变量,以及严禁翻译的特定字符串。修改一处令牌即可瞬间更新所有语言版本,无需重新翻译。
  • 结合 field.asset() 的模板化资源字段:支持限制 Web 路径、验证资源是否存在,并在读取时自动解析为公共 URL。
  • 无正文内容类型:允许特定类型完全省略 MDX 正文,其可翻译性将直接由对应的 schema 决定。
  • scribe delete 命令:删除条目的同时,一并清理其关联资源、翻译记录和快照。支持级联引用处理、--dry-run 演练模式以及 --yes 自动确认。
  • Studio 内容浏览器:提供按类型分类的文档列表、全局搜索和内联验证提示框。正文预览区域不仅能渲染资源文件,还支持点击关系链接以及使用方向键导航。

变更说明

  • 破坏性变更: 关系令牌现在必须显式包含 :href:slug 模式后缀。
  • 内置翻译提示词已围绕“创译 (transcreation)”理念重写:AI 模型将化身为母语级文案,结合原汁原味的排版习惯,灵活重塑习惯用语和文字游戏,彻底告别生硬的字面直译。

修复与优化

  • scribe translate --dry-run 现在会结合批量折扣,提供真实的预估 Token 消耗量和费用报告,而不再显示为 0 美元。

v0.0.18

涵盖 0.0.13 至 0.0.18 版本。

新增

  • 默认情况下,scribe translate 现在通过 Gemini Batch API 运行,可降低 50% 的 token 成本。支持断点续传:在轮询期间退出,重新运行 scribe translate 即可恢复未完成的任务。可使用 --batch--direct 明确指定运行模式。
  • 自动语言回退机制:当某个地区语言缺失翻译时,会优先回退到其基础语言,而不是英语(例如 fr-CA 会回退到 fr)。此功能默认开启,可通过 localeFallbacks: false 禁用。
  • 翻译失败的内容会在运行结束时自动重试一次,同时会将验证错误信息反馈给模型以便其进行修正。
  • scribe translate --type 现已支持通过逗号分隔多个内容类型 ID。

变更

  • 翻译提示词现在为所有目标语言共享相同的英文前缀,借助 Gemini 的上下文缓存机制有效减少重复输入 token 的消耗。思考 token(Thinking tokens)现已计入报告的成本中。

修复

  • 出现暂时的 Gemini 错误时,系统会自动进行退避重试。
  • 模型输出中出现的幻觉嵌套字段会被自动修剪,不再导致运行失败。
  • 即使使用了自定义的 translate.prompt,目标语言也会始终附加在提示词末尾。
  • scribe translate --force 现在也会重新翻译全新的内容。

v0.0.12

修复

  • 翻译包含 Markdown 代码块的内容时,不再引发 JSON 解析失败;译文正文中的代码块会被完整保留。

变更

  • scribe validate 现在不仅会验证已存储的译文,还会对英文源文进行 MDX 验证,从而在源头拦截无效的 MDX。

v0.0.11

涵盖 0.0.8 至 0.0.11 版本。

新增

  • 为每个内容类型引入 _redirects.json 文件以替代 frontmatter 中的 aliasesredirect_to 字段:支持同类型、跨类型以及外部重定向,并具备自动扩展翻译后别名 (slug) 的功能
  • 新增 localeRouting 配置和 createUrlBuilder(),用于基于配置生成多语言 URL
  • 新增 listRoutableTypes()isRoutableType,用于查找包含公开路由的内容类型
  • 在翻译阶段以及 scribe validate 命令中增加 MDX 验证,用于提前捕获会导致预渲染失败的内容

修复

  • 跨类型重定向时,如果 fromtoSlug 具有相同的英文别名,将不再被错误地拦截为自我重定向

移除

  • 移除了 frontmatter 中的 aliasesredirect_to(请改用 _redirects.json),以及 slugPreserveTerms(请改用 translate.context / translate.rules

v0.0.7

修复

  • 现在执行 scribe translate 时会自动移除本地化 slug 意外附加的语言代码后缀(如 -fr-he-ar),以保持 URL 整洁
  • 当现有的翻译 slug 以语言代码结尾时,scribe validate 不再导致构建失败,而是仅输出警告提示

改进

  • 本地化 slug 现在会真正翻译成目标语言,而不再保留英文:系统会向翻译模型提供明确的目标语言名称,要求其根据翻译后的标题生成 slug,并将非拉丁字符转换为拉丁字母

新增

  • 翻译提示词现已明确要求模型不要在 slug 末尾附加语言代码,因为语言路由直接由 URL 前缀处理

v0.0.6

变更

  • 将每个语言环境独立的 revisions 表替换为去重后的 en_snapshots,并通过 translations.snapshot_id 进行关联
  • 快照会在执行翻译时保存英文原文内容;多个语言环境可根据相同的 en_hash 共享同一份快照
  • scribe history 和 Studio 现在会显示英文快照的元数据,取代原有的修订版本时间线

移除

  • revisions 表(在迁移至 schema v4 时会自动删除)
更新日志 · Scribe