docs: directory-based versioning — freeze v0.16.23, fix license to Apache-2.0#1
Merged
Merged
Conversation
…Apache-2.0 - Freeze current docs (SDK v0.16.23) into /0.16.23/ as an archived line; root stays the latest (v0.20.x) line. - Evidence the live content is v0.16.23: guide/installation.md integrity hash + changelog.md '## [0.16.23]'. - Scope all root-absolute /guide /api /examples links inside 0.16.23/ to /0.16.23/* so the snapshot is self-contained. - Add archived-version banner to 0.16.23/index.md pointing to latest (/). - config.ts: add version dropdown to nav; mirror guide/api/examples/zh-guide sidebars under /0.16.23/* via a prefixSidebar() helper. - Fix stale MIT -> Apache-2.0 in index.md badge and config footer.
Deploying aastar-docs with
|
| Latest commit: |
6861f1a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://30dcf8de.aastar-docs.pages.dev |
| Branch Preview URL: | https://chore-docs-versioning-0-16-2.aastar-docs.pages.dev |
clestons
approved these changes
Jun 18, 2026
clestons
left a comment
There was a problem hiding this comment.
clestons review — #1 [2-round, APPROVE]
docs: directory-based versioning — freeze v0.16.23, fix license to Apache-2.0 — 文档版本化结构正确,两轮通过。
核心确认
prefixSidebar() 递归前缀
if (typeof next.link === 'string' && next.link.startsWith('/')) {
next.link = prefix + next.link
}
if (Array.isArray(next.items)) {
next.items = prefixSidebar(next.items, prefix)
}根绝对链接全部被前缀 — 包括 hash 锚点(/api/@aastar/sdk#installation → /0.16.23/api/@aastar/sdk#installation)✅;外部链接(GitHub 等)不以 / 开头,不受影响 ✅。
归档 banner 确认
> [!WARNING]
> **Archived documentation — SDK v0.16.23.** This is a frozen snapshot of an older release. For the latest version, see the [current documentation](/).存在于 0.16.23/index.md ✅;hero actions 使用版本化路径 /0.16.23/guide/getting-started ✅。
License 变更
root/index.md徽章:MIT → Apache-2.0 ✅.vitepress/config.tsfooter:MIT → Apache-2.0 ✅- VitePress build 实测通过(1.6.4,~29s)✅
410 个冻结快照文件
内部相对链接(如 classes/UserOpClient.md)无需改写,路径在 0.16.23/ 子目录下仍正确解析 ✅。sidebar 导航由 prefixSidebar() 统一处理 ✅。
关于第 ② 点(归档快照 license)
建议:保留 MIT。 冻结快照 0.16.23/index.md 中的 MIT 徽章是历史准确的——v0.16.23 发布时 license 确实是 MIT;Apache-2.0 是后续决定。改写归档会让快照失去"历史原样"的意义。如果未来有人对照 npm 发布的 0.16.23 版本,MIT 是正确的历史 license。当前处理方式正确。
非阻塞建议
ARCHIVED_VERSION常量 — 若未来新增 v0.17.x 归档,可以考虑从ARCHIVED_VERSION: string[]数组驱动prefixSidebar,避免每次手动新增 sidebar key;但当前单版本范围合理。0.16.23/guide/getting-started.md内嵌绝对外链 — 文件中含https://docs.aastar.io/api/@aastar/community等绝对链接指向当前版本站点,这是常见归档惯例(外链不冻结),可接受;如需完全隔离也可替换为相对路径,非阻塞。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduce VitePress directory-based doc versioning. The current live docs describe SDK v0.16.23, but the SDK has since moved to v0.20.5. This PR freezes the current content as an archived
/0.16.23/line and keeps the repo root as the latest (v0.20.x) line, plus fixes a stale license label.Versioning scheme
/) = latest line (v0.20.x). Continues to receive updates./0.16.23/= frozen snapshot of the docs as they describe SDK v0.16.23.v0.20.x (latest)→/,v0.16.23→/0.16.23/).prefixSidebar()helper in.vitepress/config.tsthat deep-clones each array and prefixes every root-absolutelinkwith/0.16.23— avoiding hand-maintained duplicates.0.16.23/index.mdgets an "archived version" banner pointing back to latest (/)./guide,/api,/examples) inside0.16.23/**/*.mdare rescoped to/0.16.23/...so the snapshot is self-contained.Evidence the live content is v0.16.23
guide/installation.mdcarries the v0.16.23 SDK integrity hash.changelog.mdtop released entry is## [0.16.23].Status-0.16.6badge was stale and is unrelated to content version.)License fix (MIT → Apache-2.0)
The project is Apache-2.0, but the docs still labelled MIT:
index.mdlicense badge → Apache-2.0..vitepress/config.tsfooter message → "Released under the Apache-2.0 License."What changed
.vitepress/config.ts— extracted sidebar arrays into named consts; addedprefixSidebar()helper; added version dropdown tonav; added mirrored/0.16.23/{guide,api,examples}/and/0.16.23/zh/guide/sidebar keys; footer → Apache-2.0.ignoreDeadLinksleft as-is.index.md— license badge MIT → Apache-2.0.0.16.23/— new frozen snapshot (index.md, changelog.md, guide/, api/, examples/, zh/), with version-scoped links + archived banner.Build
pnpm run docs:buildsucceeds locally with these changes (VitePress 1.6.4). Build output (.vitepress/dist/) is intentionally not committed (gitignored).