From 1ea0eac6a2fd6d7c649a6fa77e149948bfe40262 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Tue, 3 Feb 2026 08:56:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(docs):=20=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E7=94=9F=E6=88=90=E7=B3=BB=E7=BB=9F=E5=B9=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=A1=86=E6=9E=B6=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 配置docfx.json以支持多项目源文件生成API文档 - 添加filterConfig.yml过滤测试和内部实现相关代码 - 创建主页index.md介绍GFramework框架特性 - 配置多层级目录结构toc.yml组织文档导航 - 设置构建输出路径和全局元数据配置 --- docfx/docfx.json | 47 ++++++++++++++++++++++++++++++++++++------ docfx/filterConfig.yml | 13 ++++++++++++ docfx/toc.yml | 5 +++++ docs/api/toc.yml | 2 ++ docs/index.md | 33 +++++++++++++++++++++++++++++ docs/toc.yml | 29 ++++++++++++++++++++++++++ 6 files changed, 123 insertions(+), 6 deletions(-) create mode 100644 docfx/filterConfig.yml create mode 100644 docfx/toc.yml create mode 100644 docs/api/toc.yml create mode 100644 docs/index.md create mode 100644 docs/toc.yml diff --git a/docfx/docfx.json b/docfx/docfx.json index 0d2a294..02d87be 100644 --- a/docfx/docfx.json +++ b/docfx/docfx.json @@ -1,19 +1,54 @@ -{ +{ "metadata": [ { "src": [ { - "files": [ "GFramework.sln" ] + "src": "..", + "files": [ + "GFramework.Core/GFramework.Core.csproj", + "GFramework.Core.Abstractions/GFramework.Core.Abstractions.csproj", + "GFramework.Game/GFramework.Game.csproj", + "GFramework.Game.Abstractions/GFramework.Game.Abstractions.csproj", + "GFramework.Godot/GFramework.Godot.csproj" + ] } ], - "dest": "api" + "dest": "api", + "filter": "filterConfig.yml", + "properties": { + "TargetFramework": "net8.0" + } } ], "build": { "content": [ - { "files": [ "api/**.yml", "api/index.md" ] }, - { "files": [ "docs/**.md", "docs/**/toc.yml" ] } + { + "files": [ "api/**.yml", "api/index.md" ] + }, + { + "files": [ "../docs/**.md", "../docs/**/toc.yml" ], + "src": "../docs" + }, + { + "files": [ "toc.yml", "*.md" ] + } ], - "dest": "_site" + "resource": [ + { + "files": [ "../README.md" ], + "src": ".." + } + ], + "dest": "_site", + "template": [ "default" ], + "globalMetadata": { + "_appTitle": "GFramework Documentation", + "_enableSearch": true, + "_appFooter": "Copyright © 2026 GeWuYou. All rights reserved.", + "pdf": false + }, + "xref": [ + "https://learn.microsoft.com/en-us/dotnet/.xrefmap.json" + ] } } diff --git a/docfx/filterConfig.yml b/docfx/filterConfig.yml new file mode 100644 index 0000000..ff8587b --- /dev/null +++ b/docfx/filterConfig.yml @@ -0,0 +1,13 @@ +apiRules: +- exclude: + # 排除测试项目 + uidRegex: ^.*Tests$ + type: Namespace +- exclude: + # 排除生成器项目 + uidRegex: ^.*SourceGenerators.*$ + type: Namespace +- exclude: + # 排除内部实现细节 + uidRegex: ^.*Internals.*$ + type: Namespace \ No newline at end of file diff --git a/docfx/toc.yml b/docfx/toc.yml new file mode 100644 index 0000000..276b2c5 --- /dev/null +++ b/docfx/toc.yml @@ -0,0 +1,5 @@ +- name: Home + href: ../docs/index.md +- name: API Documentation + href: api/ + homepage: api/namespaces.md \ No newline at end of file diff --git a/docs/api/toc.yml b/docs/api/toc.yml new file mode 100644 index 0000000..407dc09 --- /dev/null +++ b/docs/api/toc.yml @@ -0,0 +1,2 @@ +- name: Namespaces + href: namespaces.md \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..407f04f --- /dev/null +++ b/docs/index.md @@ -0,0 +1,33 @@ +# GFramework Documentation + +Welcome to the GFramework documentation! + +## Overview + +GFramework is a comprehensive game development framework built with clean architecture principles. It provides a solid foundation for building scalable and maintainable game applications. + +## Key Features + +- **Clean Architecture**: Well-defined separation of concerns +- **Modular Design**: Pluggable architecture modules +- **Event System**: Robust event-driven programming +- **Command Pattern**: Structured command execution +- **Property Binding**: Reactive property system +- **Coroutine Support**: Asynchronous programming utilities +- **IOC Container**: Dependency injection support +- **Logging System**: Comprehensive logging capabilities + +## Getting Started + +Check out the [API Documentation](api/) for detailed reference, or explore the specific modules in the navigation menu. + +## Modules + +- **Core**: Fundamental framework components +- **Game**: Game-specific extensions +- **Godot**: Godot engine integration +- **Source Generators**: Compile-time code generation + +## Contributing + +Please read our contributing guidelines before submitting pull requests. \ No newline at end of file diff --git a/docs/toc.yml b/docs/toc.yml new file mode 100644 index 0000000..841496d --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,29 @@ +- name: Home + href: index.md +- name: API Documentation + href: api/ + homepage: api/index.md +- name: Core Framework + items: + - name: Architecture + href: GFramework.Core/architecture/README.md + - name: Commands + href: GFramework.Core/command/README.md + - name: Events + href: GFramework.Core/events/README.md + - name: Properties + href: GFramework.Core/property/README.md + - name: Systems + href: GFramework.Core/system/README.md + - name: Models + href: GFramework.Core/model/README.md + - name: Queries + href: GFramework.Core/query/README.md + - name: Coroutines + href: GFramework.Core/coroutine/ + - name: Logging + href: GFramework.Core/logging/README.md + - name: IOC Container + href: GFramework.Core/ioc/README.md + - name: Pool System + href: GFramework.Core/pool/README.md \ No newline at end of file