Skip to content

feat: 恢复发行版更新日志章节(一律 draft),接口与封面尊重草稿 - #58

Merged
yi-ge merged 1 commit into
mainfrom
feat/oem-changelog-draft
Sep 19, 2026
Merged

yi-ge merged 1 commit into
mainfrom
feat/oem-changelog-draft

Conversation

@yi-ge

@yi-ge yi-ge commented Sep 19, 2026

Copy link
Copy Markdown
Member

变更说明 / Description

中文

  • 恢复发行版更新日志章节(中英)与 plugins/changelog-editions.json 条目:章节 index.mddraft: true_category_.json 不再写 link(index 是草稿,生产构建里不存在);不恢复 05-more 的入口链接(指向草稿页面的链接在生产构建里是死链,会让构建失败)。
  • changelog-json-plugin 尊重草稿:生产构建时,草稿版本不进 /api/<outputFile>(该文件仍会生成,版本列表为空),草稿页面(中英)引用的封面图从站点输出中移除;开发环境行为不变。
  • 条目描述里写明草稿规则:发布流程写入的版本页面一律 draft: true;公开某个版本 = 把该页面(中英)的 draft 改为 false 或删除该行。
  • 配套的主仓改动(发布流程写页面时带 draft: true)在另一个 PR 中提交。

English

  • Restore the distribution-specific changelog section (zh + en) and its plugins/changelog-editions.json entry: the section index.md carries draft: true; _category_.json no longer sets link (the index is a draft and does not exist in production builds); the entry links from 05-more are not restored (links to draft pages are broken links in production builds and fail the build).
  • changelog-json-plugin now honors drafts: in production builds draft versions are left out of /api/<outputFile> (the file is still generated, with an empty version list) and the cover images referenced by draft pages (zh + en) are removed from the site output; development behavior is unchanged.
  • The entry description documents the rule: version pages written by the release workflow are always draft: true; publishing a version means setting draft to false (or deleting the line) on that page (zh + en).
  • The companion main-repo change (the release workflow writes pages with draft: true) is a separate PR.

测试方式 / Test Plan

  • 用临时站点目录本地验证插件(生产与开发两种 NODE_ENV):草稿/非草稿混合、全部为草稿、封面路径穿越(输出目录之外的文件不会被删)均符合预期 / Verified the plugin locally on a temporary site directory in both production and development modes: mixed and all-draft cases and cover-path traversal (files outside the output directory are never deleted) behave as expected.
  • 在真实目录树上以生产模式生成:desirecore 的 170 个版本与线上 api/changelog.json 完全一致,OEM 的版本列表为空 / On the real tree in production mode: the 170 desirecore versions are identical to the live api/changelog.json, and the OEM list is empty.
  • 站点整体构建交给本 PR 的 Vercel 预览(生产构建)验证 / The full site build is verified by this PR's Vercel preview (a production build).

检查清单 / Checklist

- 恢复发行版更新日志章节(中英)与 changelog-editions 条目:章节 index 带 draft: true,
  _category_.json 不再写 link(index 是草稿,生产构建里不存在);不恢复 05-more 的入口链接(死链会让构建失败)
- changelog-json-plugin 尊重草稿:生产构建时草稿版本不进 /api/<outputFile>(仍输出合法的空列表),
  草稿页面(中英)引用的封面图从站点输出中移除;开发环境行为不变
- 条目描述里写明草稿规则:发布流程写入的版本页面一律 draft: true,公开某个版本 = 把该页面的 draft 改为 false
@vercel

vercel Bot commented Sep 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 19, 2026 8:35am UTC

Request Review

@yi-ge
yi-ge merged commit a59701e into main Sep 19, 2026
3 checks passed
@yi-ge
yi-ge deleted the feat/oem-changelog-draft branch September 19, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant