From eaa59c03c3a8a5fc3ccb87a4d65c9bfb00832ea7 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Sat, 7 Mar 2026 23:30:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs(config):=20=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E5=AF=BC=E8=88=AA=E7=BB=93=E6=9E=84=E5=B9=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=96=B0=E7=AB=A0=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加最佳实践导航菜单和相关页面链接 - 在核心模块侧边栏增加生命周期、CQRS模式、协程系统等新条目 - 为游戏模块添加数据管理、场景系统、UI系统等功能链接 - 在Godot集成部分新增暂停系统、对象池和日志系统文档 - 将规则生成器重命名为ContextAware生成器 - 在教程部分增加暂停系统实践、数据迁移和单元测试等内容 - 新增API参考、常见问题、故障排查等文档分类 - 为最佳实践页面配置详细的子菜单项 --- docs/.vitepress/config.mts | 57 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 7141c73..919ee59 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -51,6 +51,17 @@ export default defineConfig({ { text: 'Godot', link: '/zh-CN/godot/' }, { text: '源码生成器', link: '/zh-CN/source-generators' }, { text: '教程', link: '/zh-CN/tutorials/' }, + { text: '最佳实践', link: '/zh-CN/best-practices/' }, + { + text: '更多', + items: [ + { text: 'API 参考', link: '/zh-CN/api-reference/' }, + { text: '常见问题', link: '/zh-CN/faq' }, + { text: '故障排查', link: '/zh-CN/troubleshooting' }, + { text: '迁移指南', link: '/zh-CN/migration-guide' }, + { text: '贡献指南', link: '/zh-CN/contributing' } + ] + } ], sidebar: { @@ -73,13 +84,20 @@ export default defineConfig({ { text: '架构组件', link: '/zh-CN/core/architecture' }, { text: 'Context 上下文', link: '/zh-CN/core/context' }, { text: '异步初始化', link: '/zh-CN/core/async-initialization' }, + { text: '生命周期', link: '/zh-CN/core/lifecycle' }, { text: '命令系统', link: '/zh-CN/core/command' }, { text: '查询系统', link: '/zh-CN/core/query' }, + { text: 'CQRS 模式', link: '/zh-CN/core/cqrs' }, { text: '事件系统', link: '/zh-CN/core/events' }, { text: '属性系统', link: '/zh-CN/core/property' }, { text: 'IoC容器', link: '/zh-CN/core/ioc' }, { text: 'ECS 系统集成', link: '/zh-CN/core/ecs' }, + { text: '协程系统', link: '/zh-CN/core/coroutine' }, + { text: '状态机', link: '/zh-CN/core/state-machine' }, + { text: '暂停系统', link: '/zh-CN/core/pause' }, { text: '对象池', link: '/zh-CN/core/pool' }, + { text: '资源管理', link: '/zh-CN/core/resource' }, + { text: '配置管理', link: '/zh-CN/core/configuration' }, { text: '日志系统', link: '/zh-CN/core/logging' }, { text: '函数式编程', link: '/zh-CN/core/functional' }, { text: '扩展方法', link: '/zh-CN/core/extensions' }, @@ -97,6 +115,11 @@ export default defineConfig({ text: 'Game 游戏模块', items: [ { text: '概览', link: '/zh-CN/game/' }, + { text: '数据管理', link: '/zh-CN/game/data' }, + { text: '场景系统', link: '/zh-CN/game/scene' }, + { text: 'UI 系统', link: '/zh-CN/game/ui' }, + { text: '存储系统', link: '/zh-CN/game/storage' }, + { text: '序列化', link: '/zh-CN/game/serialization' }, { text: '游戏设置', link: '/zh-CN/game/setting' } ] } @@ -115,6 +138,9 @@ export default defineConfig({ { text: '节点扩展', link: '/zh-CN/godot/extensions' }, { text: '信号系统', link: '/zh-CN/godot/signal' }, { text: '存储系统', link: '/zh-CN/godot/storage' }, + { text: '暂停系统', link: '/zh-CN/godot/pause' }, + { text: '对象池', link: '/zh-CN/godot/pool' }, + { text: '日志系统', link: '/zh-CN/godot/logging' }, { text: '设置系统', link: '/zh-CN/godot/setting' } ] } @@ -127,7 +153,7 @@ export default defineConfig({ { text: '概览', link: '/zh-CN/source-generators/' }, { text: '日志生成器', link: '/zh-CN/source-generators/logging-generator' }, { text: '枚举扩展', link: '/zh-CN/source-generators/enum-generator' }, - { text: '规则生成器', link: '/zh-CN/source-generators/rule-generator' } + { text: 'ContextAware 生成器', link: '/zh-CN/source-generators/context-aware-generator' } ] } ], @@ -164,12 +190,39 @@ export default defineConfig({ }, { text: '使用协程系统', link: '/zh-CN/tutorials/coroutine-tutorial' }, { text: '实现状态机', link: '/zh-CN/tutorials/state-machine-tutorial' }, + { text: '暂停系统实践', link: '/zh-CN/tutorials/pause-system' }, { text: '函数式编程实践', link: '/zh-CN/tutorials/functional-programming' }, { text: '资源管理最佳实践', link: '/zh-CN/tutorials/resource-management' }, { text: '实现存档系统', link: '/zh-CN/tutorials/save-system' }, + { text: '数据迁移', link: '/zh-CN/tutorials/data-migration' }, { text: 'Godot 集成', link: '/zh-CN/tutorials/godot-integration' }, { text: 'Godot 完整项目', link: '/zh-CN/tutorials/godot-complete-project' }, - { text: '高级模式', link: '/zh-CN/tutorials/advanced-patterns' } + { text: '高级模式', link: '/zh-CN/tutorials/advanced-patterns' }, + { text: '大型项目组织', link: '/zh-CN/tutorials/large-project-organization' }, + { text: '单元测试', link: '/zh-CN/tutorials/unit-testing' } + ] + } + ], + + '/zh-CN/best-practices/': [ + { + text: '最佳实践', + items: [ + { text: '概览', link: '/zh-CN/best-practices/' }, + { text: '架构模式', link: '/zh-CN/best-practices/architecture-patterns' }, + { text: '错误处理', link: '/zh-CN/best-practices/error-handling' }, + { text: '性能优化', link: '/zh-CN/best-practices/performance' }, + { text: '移动端优化', link: '/zh-CN/best-practices/mobile-optimization' }, + { text: '多人游戏', link: '/zh-CN/best-practices/multiplayer' } + ] + } + ], + + '/zh-CN/api-reference/': [ + { + text: 'API 参考', + items: [ + { text: 'API 文档', link: '/zh-CN/api-reference/' } ] } ], From 0d20a28385abc616dbaba786515e1cbcf8b2cbde Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Sat, 7 Mar 2026 23:34:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(docs):=20=E4=BF=AE=E6=AD=A3=20API=20?= =?UTF-8?q?=E5=8F=82=E8=80=83=E9=93=BE=E6=8E=A5=E8=B7=AF=E5=BE=84=E5=B9=B6?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E9=87=8D=E5=A4=8D=E4=BE=A7=E8=BE=B9=E6=A0=8F?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修正了 API 参考链接路径,移除了末尾多余的斜杠 - 移除了重复的 API 参考侧边栏配置项 - 确保导航链接的一致性和正确性 --- docs/.vitepress/config.mts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 919ee59..a6aaef0 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -55,7 +55,7 @@ export default defineConfig({ { text: '更多', items: [ - { text: 'API 参考', link: '/zh-CN/api-reference/' }, + { text: 'API 参考', link: '/zh-CN/api-reference' }, { text: '常见问题', link: '/zh-CN/faq' }, { text: '故障排查', link: '/zh-CN/troubleshooting' }, { text: '迁移指南', link: '/zh-CN/migration-guide' }, @@ -217,15 +217,6 @@ export default defineConfig({ ] } ], - - '/zh-CN/api-reference/': [ - { - text: 'API 参考', - items: [ - { text: 'API 文档', link: '/zh-CN/api-reference/' } - ] - } - ], }, socialLinks: [