Skip to content

docs(config): 更新文档导航结构并添加新章节#87

Merged
GeWuYou merged 2 commits into
mainfrom
docs/technical-documentation-update
Mar 7, 2026
Merged

docs(config): 更新文档导航结构并添加新章节#87
GeWuYou merged 2 commits into
mainfrom
docs/technical-documentation-update

Conversation

@GeWuYou

@GeWuYou GeWuYou commented Mar 7, 2026

Copy link
Copy Markdown
Owner
  • 添加最佳实践导航菜单和相关页面链接
  • 在核心模块侧边栏增加生命周期、CQRS模式、协程系统等新条目
  • 为游戏模块添加数据管理、场景系统、UI系统等功能链接
  • 在Godot集成部分新增暂停系统、对象池和日志系统文档
  • 将规则生成器重命名为ContextAware生成器
  • 在教程部分增加暂停系统实践、数据迁移和单元测试等内容
  • 新增API参考、常见问题、故障排查等文档分类
  • 为最佳实践页面配置详细的子菜单项

Summary by Sourcery

重构中文版文档的导航结构,引入新的章节,并为 core、game、Godot 和教程等内容分组归类。

Documentation:

  • 添加顶级的「最佳实践(Best Practices)」章节及其详细子菜单,并将 API 参考、FAQ、故障排查、迁移、贡献指南等条目按组进行导航展示。
  • 扩展 core 模块的侧边栏,加入生命周期、CQRS、协程、状态机、暂停、资源以及配置等主题。
  • 扩展 game 模块文档导航,加入数据管理、场景、UI、存储和序列化等页面。
  • 优化 Godot 集成文档导航结构,加入暂停系统、对象池以及日志等主题。
  • 将规则源生成器(rule source generator)文档条目重命名为 ContextAware generator。
  • 添加新的教程链接,涵盖暂停系统实践、数据迁移、大型项目组织以及单元测试等内容。
Original summary in English

Summary by Sourcery

Restructure the Chinese documentation navigation to introduce new sections and group related content for core, game, Godot, and tutorials.

Documentation:

  • Add a top-level Best Practices section with a detailed submenu and introduce grouped navigation items for API reference, FAQ, troubleshooting, migration, and contributing guides.
  • Expand the core module sidebar with lifecycle, CQRS, coroutine, state machine, pause, resource, and configuration topics.
  • Extend the game module docs navigation with data management, scene, UI, storage, and serialization pages.
  • Enhance the Godot integration docs navigation with pause system, object pooling, and logging topics.
  • Rename the rule source generator documentation entry to ContextAware generator.
  • Add new tutorial links covering pause system practice, data migration, large project organization, and unit testing.

- 添加最佳实践导航菜单和相关页面链接
- 在核心模块侧边栏增加生命周期、CQRS模式、协程系统等新条目
- 为游戏模块添加数据管理、场景系统、UI系统等功能链接
- 在Godot集成部分新增暂停系统、对象池和日志系统文档
- 将规则生成器重命名为ContextAware生成器
- 在教程部分增加暂停系统实践、数据迁移和单元测试等内容
- 新增API参考、常见问题、故障排查等文档分类
- 为最佳实践页面配置详细的子菜单项
@sourcery-ai

sourcery-ai Bot commented Mar 7, 2026

Copy link
Copy Markdown

审阅者指南

在 VitePress 中更新中文文档导航,引入新的“最佳实践”板块,扩展 core、game、Godot 和 tutorials 的侧边栏,并新增包括 API 参考和其他支持文档在内的顶级和分组菜单项,同时将规则源码生成器条目重命名为 ContextAware 生成器。

更新后的 zh-CN 文档导航结构流程图

flowchart TD
  Root[zhCN documentation navigation]

  Root --> TopNav[Top navigation]
  Root --> Sidebars[Sidebars by section]

  %% Top navigation items
  TopNav --> NavCore[Core 核心]
  TopNav --> NavGame[Game 游戏]
  TopNav --> NavGodot[Godot]
  TopNav --> NavSourceGenerators[源码生成器]
  TopNav --> NavTutorials[教程]
  TopNav --> NavBestPractices[最佳实践]
  TopNav --> NavMore[更多 下拉菜单]

  NavMore --> MoreAPIReference[API 参考]
  NavMore --> MoreFAQ[常见问题]
  NavMore --> MoreTroubleshooting[故障排查]
  NavMore --> MoreMigrationGuide[迁移指南]
  NavMore --> MoreContributing[贡献指南]

  %% Core sidebar
  Sidebars --> CoreSidebar[/zhCN core/]
  CoreSidebar --> CoreOverview[概览]
  CoreSidebar --> CoreArchitecture[架构组件]
  CoreSidebar --> CoreContext[Context 上下文]
  CoreSidebar --> CoreAsyncInit[异步初始化]
  CoreSidebar --> CoreLifecycle[生命周期]
  CoreSidebar --> CoreCommand[命令系统]
  CoreSidebar --> CoreQuery[查询系统]
  CoreSidebar --> CoreCQRS[CQRS 模式]
  CoreSidebar --> CoreEvents[事件系统]
  CoreSidebar --> CoreProperty[属性系统]
  CoreSidebar --> CoreIoC[IoC 容器]
  CoreSidebar --> CoreECS[ECS 系统集成]
  CoreSidebar --> CoreCoroutine[协程系统]
  CoreSidebar --> CoreStateMachine[状态机]
  CoreSidebar --> CorePause[暂停系统]
  CoreSidebar --> CorePool[对象池]
  CoreSidebar --> CoreResource[资源管理]
  CoreSidebar --> CoreConfiguration[配置管理]
  CoreSidebar --> CoreLogging[日志系统]
  CoreSidebar --> CoreFunctional[函数式编程]
  CoreSidebar --> CoreExtensions[扩展方法]

  %% Game sidebar
  Sidebars --> GameSidebar[/zhCN game/]
  GameSidebar --> GameOverview[概览]
  GameSidebar --> GameData[数据管理]
  GameSidebar --> GameScene[场景系统]
  GameSidebar --> GameUI[UI 系统]
  GameSidebar --> GameStorage[存储系统]
  GameSidebar --> GameSerialization[序列化]
  GameSidebar --> GameSetting[游戏设置]

  %% Godot sidebar
  Sidebars --> GodotSidebar[/zhCN godot/]
  GodotSidebar --> GodotOverview[概览]
  GodotSidebar --> GodotExtensions[节点扩展]
  GodotSidebar --> GodotSignal[信号系统]
  GodotSidebar --> GodotStorage[存储系统]
  GodotSidebar --> GodotPause[暂停系统]
  GodotSidebar --> GodotPool[对象池]
  GodotSidebar --> GodotLogging[日志系统]
  GodotSidebar --> GodotSetting[设置系统]

  %% Source generators sidebar
  Sidebars --> GeneratorsSidebar[/zhCN sourcegenerators/]
  GeneratorsSidebar --> GenOverview[概览]
  GeneratorsSidebar --> GenLogging[日志生成器]
  GeneratorsSidebar --> GenEnum[枚举扩展]
  GeneratorsSidebar --> GenContextAware[ContextAware 生成器]

  %% Tutorials sidebar
  Sidebars --> TutorialsSidebar[/zhCN tutorials/]
  TutorialsSidebar --> TutOverview[概览]
  TutorialsSidebar --> TutQuickStart[快速开始]
  TutorialsSidebar --> TutCoroutine[使用协程系统]
  TutorialsSidebar --> TutStateMachine[实现状态机]
  TutorialsSidebar --> TutPausePractice[暂停系统实践]
  TutorialsSidebar --> TutFunctional[函数式编程实践]
  TutorialsSidebar --> TutResource[资源管理最佳实践]
  TutorialsSidebar --> TutSaveSystem[实现存档系统]
  TutorialsSidebar --> TutDataMigration[数据迁移]
  TutorialsSidebar --> TutGodotIntegration[Godot 集成]
  TutorialsSidebar --> TutGodotProject[Godot 完整项目]
  TutorialsSidebar --> TutAdvancedPatterns[高级模式]
  TutorialsSidebar --> TutLargeProject[大型项目组织]
  TutorialsSidebar --> TutUnitTesting[单元测试]

  %% Best practices sidebar
  Sidebars --> BestPracticesSidebar[/zhCN bestpractices/]
  BestPracticesSidebar --> BPOverview[概览]
  BestPracticesSidebar --> BPArchitecturePatterns[架构模式]
  BestPracticesSidebar --> BPErrorHandling[错误处理]
  BestPracticesSidebar --> BPPerformance[性能优化]
  BestPracticesSidebar --> BPMobileOptimization[移动端优化]
  BestPracticesSidebar --> BPMultiplayer[多人游戏]

  %% API reference sidebar
  Sidebars --> APISidebar[/zhCN apireference/]
  APISidebar --> APIOverview[API 文档]
Loading

文件级变更

变更 详情 文件
使用“最佳实践”和分组的“更多”菜单(包含支持与贡献文档)扩展中文文档顶级导航栏。
  • 在主导航中添加指向 /zh-CN/best-practices/ 的“最佳实践”入口
  • 新增“更多”下拉菜单,其中包含 API 参考、常见问题、故障排查、迁移指南和贡献链接
docs/.vitepress/config.mts
扩展 core 模块侧边栏,加入更多系统和模式相关页面。
  • 在 core 侧边栏中添加生命周期文档链接
  • 在 core 下添加 CQRS 模式、协程系统和状态机的链接
  • 在 core 下添加暂停系统、资源管理和配置管理的链接
docs/.vitepress/config.mts
扩展 Game 模块侧边栏,加入新的数据和系统相关页面。
  • 在 Game 区域下添加数据管理、场景系统、UI 系统、存储和序列化的链接
docs/.vitepress/config.mts
扩展 Godot 集成侧边栏,加入暂停、对象池和日志系统文档。
  • 在 Godot 区域下添加暂停系统、对象池和日志系统的链接
docs/.vitepress/config.mts
将规则源码生成器导航项重命名为 ContextAware 生成器,并更新路径。
  • 用 ContextAware Generator 替换 Rule Generator 菜单项,并将其链接更新为 /zh-CN/source-generators/context-aware-generator
docs/.vitepress/config.mts
扩展教程侧边栏,加入新的实践向指南,包括暂停、数据迁移、项目组织和测试。
  • 添加暂停系统实践和数据迁移教程链接
  • 添加大型项目组织和单元测试教程链接
docs/.vitepress/config.mts
为“最佳实践”和“API 参考”板块新增独立的侧边栏,并配置结构化子项。
  • 配置“最佳实践”侧边栏分组,包含架构、错误处理、性能、移动端优化和多人游戏页面
  • 配置“API 参考”侧边栏分组,包含一个 API 文档入口
docs/.vitepress/config.mts

提示与命令

与 Sourcery 交互

  • 触发新审查: 在 Pull Request 中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审查评论。
  • 从审查评论生成 GitHub Issue: 在某条审查评论下回复,要求 Sourcery 从该评论创建一个 Issue。你也可以直接回复 @sourcery-ai issue,从该评论生成一个 Issue。
  • 生成 Pull Request 标题: 在 Pull Request 标题中任意位置写上 @sourcery-ai 即可随时生成标题。也可以在 Pull Request 中评论 @sourcery-ai title 来(重新)生成标题。
  • 生成 Pull Request 摘要: 在 Pull Request 正文任意位置写上 @sourcery-ai summary,即可在对应位置生成 PR 摘要。也可以在 Pull Request 中评论 @sourcery-ai summary 来在任意时间(重新)生成摘要。
  • 生成审阅者指南: 在 Pull Request 中评论 @sourcery-ai guide,即可在任意时间(重新)生成审阅者指南。
  • 解决所有 Sourcery 评论: 在 Pull Request 中评论 @sourcery-ai resolve 来解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,这会很有用。
  • 忽略所有 Sourcery 审查: 在 Pull Request 中评论 @sourcery-ai dismiss,忽略所有现有的 Sourcery 审查。若你想从一次全新的审查开始,这尤其有用——别忘了再评论 @sourcery-ai review 来触发新的审查!

自定义你的体验

访问你的 控制面板 来:

  • 启用或禁用审查功能,例如 Sourcery 生成的 Pull Request 摘要、审阅者指南等。
  • 更改审查语言。
  • 添加、移除或编辑自定义审查指令。
  • 调整其他审查设置。

获取帮助

Original review guide in English

Reviewer's Guide

Update the Chinese documentation navigation in VitePress to introduce a new “Best Practices” section, expand sidebars for core, game, Godot, and tutorials, and add new top-level and grouped menu items including API reference and other support docs, while renaming the rule source generator entry to a ContextAware generator.

Flow diagram for updated zh-CN documentation navigation structure

flowchart TD
  Root[zhCN documentation navigation]

  Root --> TopNav[Top navigation]
  Root --> Sidebars[Sidebars by section]

  %% Top navigation items
  TopNav --> NavCore[Core 核心]
  TopNav --> NavGame[Game 游戏]
  TopNav --> NavGodot[Godot]
  TopNav --> NavSourceGenerators[源码生成器]
  TopNav --> NavTutorials[教程]
  TopNav --> NavBestPractices[最佳实践]
  TopNav --> NavMore[更多 下拉菜单]

  NavMore --> MoreAPIReference[API 参考]
  NavMore --> MoreFAQ[常见问题]
  NavMore --> MoreTroubleshooting[故障排查]
  NavMore --> MoreMigrationGuide[迁移指南]
  NavMore --> MoreContributing[贡献指南]

  %% Core sidebar
  Sidebars --> CoreSidebar[/zhCN core/]
  CoreSidebar --> CoreOverview[概览]
  CoreSidebar --> CoreArchitecture[架构组件]
  CoreSidebar --> CoreContext[Context 上下文]
  CoreSidebar --> CoreAsyncInit[异步初始化]
  CoreSidebar --> CoreLifecycle[生命周期]
  CoreSidebar --> CoreCommand[命令系统]
  CoreSidebar --> CoreQuery[查询系统]
  CoreSidebar --> CoreCQRS[CQRS 模式]
  CoreSidebar --> CoreEvents[事件系统]
  CoreSidebar --> CoreProperty[属性系统]
  CoreSidebar --> CoreIoC[IoC 容器]
  CoreSidebar --> CoreECS[ECS 系统集成]
  CoreSidebar --> CoreCoroutine[协程系统]
  CoreSidebar --> CoreStateMachine[状态机]
  CoreSidebar --> CorePause[暂停系统]
  CoreSidebar --> CorePool[对象池]
  CoreSidebar --> CoreResource[资源管理]
  CoreSidebar --> CoreConfiguration[配置管理]
  CoreSidebar --> CoreLogging[日志系统]
  CoreSidebar --> CoreFunctional[函数式编程]
  CoreSidebar --> CoreExtensions[扩展方法]

  %% Game sidebar
  Sidebars --> GameSidebar[/zhCN game/]
  GameSidebar --> GameOverview[概览]
  GameSidebar --> GameData[数据管理]
  GameSidebar --> GameScene[场景系统]
  GameSidebar --> GameUI[UI 系统]
  GameSidebar --> GameStorage[存储系统]
  GameSidebar --> GameSerialization[序列化]
  GameSidebar --> GameSetting[游戏设置]

  %% Godot sidebar
  Sidebars --> GodotSidebar[/zhCN godot/]
  GodotSidebar --> GodotOverview[概览]
  GodotSidebar --> GodotExtensions[节点扩展]
  GodotSidebar --> GodotSignal[信号系统]
  GodotSidebar --> GodotStorage[存储系统]
  GodotSidebar --> GodotPause[暂停系统]
  GodotSidebar --> GodotPool[对象池]
  GodotSidebar --> GodotLogging[日志系统]
  GodotSidebar --> GodotSetting[设置系统]

  %% Source generators sidebar
  Sidebars --> GeneratorsSidebar[/zhCN sourcegenerators/]
  GeneratorsSidebar --> GenOverview[概览]
  GeneratorsSidebar --> GenLogging[日志生成器]
  GeneratorsSidebar --> GenEnum[枚举扩展]
  GeneratorsSidebar --> GenContextAware[ContextAware 生成器]

  %% Tutorials sidebar
  Sidebars --> TutorialsSidebar[/zhCN tutorials/]
  TutorialsSidebar --> TutOverview[概览]
  TutorialsSidebar --> TutQuickStart[快速开始]
  TutorialsSidebar --> TutCoroutine[使用协程系统]
  TutorialsSidebar --> TutStateMachine[实现状态机]
  TutorialsSidebar --> TutPausePractice[暂停系统实践]
  TutorialsSidebar --> TutFunctional[函数式编程实践]
  TutorialsSidebar --> TutResource[资源管理最佳实践]
  TutorialsSidebar --> TutSaveSystem[实现存档系统]
  TutorialsSidebar --> TutDataMigration[数据迁移]
  TutorialsSidebar --> TutGodotIntegration[Godot 集成]
  TutorialsSidebar --> TutGodotProject[Godot 完整项目]
  TutorialsSidebar --> TutAdvancedPatterns[高级模式]
  TutorialsSidebar --> TutLargeProject[大型项目组织]
  TutorialsSidebar --> TutUnitTesting[单元测试]

  %% Best practices sidebar
  Sidebars --> BestPracticesSidebar[/zhCN bestpractices/]
  BestPracticesSidebar --> BPOverview[概览]
  BestPracticesSidebar --> BPArchitecturePatterns[架构模式]
  BestPracticesSidebar --> BPErrorHandling[错误处理]
  BestPracticesSidebar --> BPPerformance[性能优化]
  BestPracticesSidebar --> BPMobileOptimization[移动端优化]
  BestPracticesSidebar --> BPMultiplayer[多人游戏]

  %% API reference sidebar
  Sidebars --> APISidebar[/zhCN apireference/]
  APISidebar --> APIOverview[API 文档]
Loading

File-Level Changes

Change Details Files
Extend the top-level Chinese docs nav bar with Best Practices and a grouped More menu including support and contribution docs.
  • Add a Best Practices entry pointing to /zh-CN/best-practices/ in the main nav
  • Introduce a More dropdown menu containing API reference, FAQ, troubleshooting, migration guide, and contributing links
docs/.vitepress/config.mts
Expand the core module sidebar with additional systems and patterns pages.
  • Add lifecycle documentation link to the core sidebar
  • Add CQRS pattern, coroutine system, and state machine links under core
  • Add pause system, resource management, and configuration management links under core
docs/.vitepress/config.mts
Extend the Game module sidebar with new data and system-related pages.
  • Add data management, scene system, UI system, storage, and serialization links under the Game section
docs/.vitepress/config.mts
Extend the Godot integration sidebar with pause, pooling, and logging system docs.
  • Add pause system, object pool, and logging system links to the Godot section
docs/.vitepress/config.mts
Rename the rule source generator nav entry to ContextAware generator with a new path.
  • Replace the Rule Generator menu item with ContextAware Generator and update its link to /zh-CN/source-generators/context-aware-generator
docs/.vitepress/config.mts
Expand the tutorials sidebar with new practical guides including pause, data migration, project organization, and testing.
  • Add pause system practice and data migration tutorial links
  • Add large project organization and unit testing tutorial links
docs/.vitepress/config.mts
Introduce dedicated sidebars for Best Practices and API Reference sections with structured subitems.
  • Configure a Best Practices sidebar group with architecture, error handling, performance, mobile optimization, and multiplayer pages
  • Configure an API Reference sidebar group with an API docs entry
docs/.vitepress/config.mts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepsource-io

deepsource-io Bot commented Mar 7, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 8a070af...0d20a28 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
C# Mar 7, 2026 3:34p.m. Review ↗
Secrets Mar 7, 2026 3:34p.m. Review ↗

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你好,我在这里给出一些总体反馈:

  • navsidebar 下新增的链接同时使用了带和不带末尾斜杠的 URL(例如 /zh-CN/faq/zh-CN/api-reference/);建议统一采用一种风格,以避免产生细微的路由或 SEO 不一致问题。
  • /zh-CN/api-reference/ 侧边栏目前只有一个条目,并且链接回同一个索引页;你可以考虑简化这一部分,或者规划更多子页面,让侧边栏结构带来更明确的价值。
给 AI Agent 的提示词
Please address the comments from this code review:

## Overall Comments
- The new links under `nav` and `sidebar` mix URLs with and without trailing slashes (e.g. `/zh-CN/faq` vs `/zh-CN/api-reference/`); consider standardizing on one style to avoid subtle routing or SEO inconsistencies.
- The `/zh-CN/api-reference/` sidebar currently contains a single item linking back to the same index page; you might simplify this section or plan additional child pages so the sidebar structure adds clear value.

Sourcery 对开源项目是免费的——如果你觉得我们的代码评审对你有帮助,欢迎帮忙分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进之后的代码评审。
Original comment in English

Hey - I've left some high level feedback:

  • The new links under nav and sidebar mix URLs with and without trailing slashes (e.g. /zh-CN/faq vs /zh-CN/api-reference/); consider standardizing on one style to avoid subtle routing or SEO inconsistencies.
  • The /zh-CN/api-reference/ sidebar currently contains a single item linking back to the same index page; you might simplify this section or plan additional child pages so the sidebar structure adds clear value.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new links under `nav` and `sidebar` mix URLs with and without trailing slashes (e.g. `/zh-CN/faq` vs `/zh-CN/api-reference/`); consider standardizing on one style to avoid subtle routing or SEO inconsistencies.
- The `/zh-CN/api-reference/` sidebar currently contains a single item linking back to the same index page; you might simplify this section or plan additional child pages so the sidebar structure adds clear value.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

- 修正了 API 参考链接路径,移除了末尾多余的斜杠
- 移除了重复的 API 参考侧边栏配置项
- 确保导航链接的一致性和正确性
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