Expand description
更新日志页面模块。
对应路由 /changelog(SsrMode::Async:增强脚本声明位于 <Suspense> 内,InOrder 流式
输出开始后无法再写入 <head>,直达访问会丢失 yggdrasil-enhance.js)。
数据获取:LazyRoute::data 创建 Resource 调用 get_changelog server function,
取回编译期内嵌 CHANGELOG.md 的结构化解析结果(版本 → 分类 → 条目 HTML)。
内容随二进制版本固定,只受 SSR 页面缓存 TTL 约束,无需任何主动失效。
§布局
左侧 200px 版本目录卡片(独立滚动、两端渐隐、滑动胶囊标出当前版本、阅读位置),
小屏改为横向版本条;右侧按版本分节,每节按新增 / 改进 / 修复等分组。
不展示 ## [Unreleased]:部署即发版,解析结果里没有这一节。
目录的阅读跟随由 yggdrasil-core 的 __initChangelogNav 维护。
Structs§
- Change
Group 🔒View Props - Props for the
ChangeGroupViewcomponent. - Changelog
Header Props - Props for the
ChangelogHeadercomponent. - Changelog
Props 🔒 - Props for the
Changelogcomponent. - Changelog
Route - 更新日志路由,对应
/changelog。 - Version
Card 🔒Props - Props for the
VersionCardcomponent. - Version
NavItem 🔒Props - Props for the
VersionNavItemcomponent. - Version
NavProps 🔒 - Props for the
VersionNavcomponent.
Functions§
- Change
Group 🔒View - 单个分类组:分类小标签与条目列表。新增用陶土底,其余为中性灰。
- Changelog 🔒
- Required Props
- Changelog
Header - 页头:返回关于、标题、说明与版本数。骨架屏复用,数据到达前后不跳动。
- Version
Card 🔒 - 一个版本:等宽版本号、日期与「最新」,intro(如有),再按分类分组列出条目。
- Version
Nav 🔒 - 有界版本目录:桌面纵向滚动,小屏横向滚动。 浏览器增强负责阅读位置、滑动指示器和目录自身滚动,卸载时清理监听。
- Version
NavItem 🔒 - 原生锚点链接,SSR 和未水合时也能导航。
- __
Changelog 🔒Route_ View - date_
label 🔒 - 「2026-10-20」→「2026.10.20」。
- fetch_
changelog 🔒 - month_
label 🔒 - 「2026-06-02」→「2026.06」。