{"id":22572313,"url":"https://github.com/normanderwan/docfxforunity","last_synced_at":"2025-04-09T13:07:31.452Z","repository":{"id":41877252,"uuid":"104819894","full_name":"NormandErwan/DocFxForUnity","owner":"NormandErwan","description":"DocFX usage example for Unity projects","archived":false,"fork":false,"pushed_at":"2024-09-03T20:55:55.000Z","size":15153,"stargazers_count":228,"open_issues_count":11,"forks_count":32,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-02T06:00:07.588Z","etag":null,"topics":["docfx","gitlab","unity","unity-documentation","unity3d"],"latest_commit_sha":null,"homepage":"https://normanderwan.github.io/DocFxForUnity/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NormandErwan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-26T01:23:27.000Z","updated_at":"2025-03-24T01:21:09.000Z","dependencies_parsed_at":"2025-01-16T10:07:22.050Z","dependency_job_id":"9bbf3414-6c80-4e47-9aa4-f12524a5dae7","html_url":"https://github.com/NormandErwan/DocFxForUnity","commit_stats":{"total_commits":204,"total_committers":1,"mean_commits":204.0,"dds":0.0,"last_synced_commit":"7b96c838ff8d8cd449e0dc31c08fcb8f3ca08f5d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NormandErwan%2FDocFxForUnity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NormandErwan%2FDocFxForUnity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NormandErwan%2FDocFxForUnity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NormandErwan%2FDocFxForUnity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NormandErwan","download_url":"https://codeload.github.com/NormandErwan/DocFxForUnity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045231,"owners_count":21038553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docfx","gitlab","unity","unity-documentation","unity3d"],"created_at":"2024-12-08T02:08:49.255Z","updated_at":"2025-04-09T13:07:31.433Z","avatar_url":"https://github.com/NormandErwan.png","language":"C#","readme":"# DocFX for Unity\n\n\u003e [DocFX](https://dotnet.github.io/docfx/index.html) usage example for Unity projects\n\n[DocFX](https://dotnet.github.io/docfx/) tool generates a clean documentation that looks like the\n[Unity documentation](https://docs.unity3d.com/Manual/index.html) with a manual (written in Markdown) and a scripting\nAPI (from the C# scripts of the project).\n\nThis repository contains a simple Unity example project which documentation is automatically generated and deployed\nonline: \u003chttps://normanderwan.github.io/DocFxForUnity/\u003e. It references both C# API and Unity API.\n\n| DocFxForUnity documentation manual |\n|:----------------------------------:|\n| [![DocFxForUnity documentation manual](https://normanderwan.github.io/DocFxForUnity/resources/ExampleManual.png)](https://normanderwan.github.io/DocFxForUnity/manual/coniunctis.html) |\n\n| DocFxForUnity documentation scripting API |\n|:----------------------------------:|\n| [![DocFxForUnity documentation scripting API](https://normanderwan.github.io/DocFxForUnity/resources/ExampleScriptingApi.png)](https://normanderwan.github.io/DocFxForUnity/api/DocFxForUnity.Player.html) |\n\n## Setup your documentation\n\n1. [Install DocFX](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html#2-use-docfx-as-a-command-line-tool).\n2. Copy the `Documentation/` folder to your Unity project:\n\n    ```diff\n      .\n      ├── Assets\n    + ├── Documentation\n      ├── Package\n      ├── ProjectSettings\n      └── README.md\n    ```\n\n3. Edit the following properties in `Documentation/docfx.json`, keep the others as it is:\n\n    ```javascript\n      {\n        \"build\": {\n          \"globalMetadata\": // Edit your documentation website info, see: https://dotnet.github.io/docfx/tutorial/docfx.exe_user_manual.html#322-reserved-metadata\n          {\n            \"_appTitle\": \"Example Unity documentation\",\n            \"_appFooter\": \"Example Unity documentation\",\n            \"_enableSearch\": true\n          },\n          \"sitemap\":\n          {\n            \"baseUrl\": \"https://normanderwan.github.io/DocFxForUnity\" // The URL of your documentation website\n          }\n      }\n    ```\n\n    It's the configuration file of your documentation.\n    See \u003chttps://dotnet.github.io/docfx/tutorial/docfx.exe_user_manual.html#3-docfxjson-format\u003e for more details.\n\n4. Edit `Documentation/filterConfig.yml`:\n\n    ```yaml\n    apiRules:\n    - include: # The namespaces to generate\n        uidRegex: ^Your\\.Namespace1\n        type: Namespace\n    - include:\n        uidRegex: ^Your\\.Namespace2\n        type: Namespace\n    - exclude:\n        uidRegex: .* # Every other namespaces are ignored\n        type: Namespace\n    ```\n\n    It tells DocFX which namespaces you want to generate the documentation.\n    See \u003chttps://dotnet.github.io/docfx/tutorial/howto_filter_out_unwanted_apis_attributes.html\u003e for more details.\n\n5. Document your classes and methods. See \u003chttps://docs.microsoft.com/en-us/dotnet/csharp/codedoc\u003e for more details.\n\n6. (Optional) Add your manual pages:\n    - Write a Markdown file for each page in `Documentation/manual/`.\n    - Keep a list of these pages on `Documentation/manual/toc.yml`.\n\n7. (Optional) Add resources such as images:\n    - Copy them to `Documentation/resources/`.\n    - Reference them on your docs or manual pages.\n    - See \u003chttps://dotnet.github.io/docfx/tutorial/links_and_cross_references.html#link-to-a-file-using-relative-path\u003e for more details.\n\n8. (Optional) Document your namespaces:\n    - For each namespace, add a `Assets/Scripts/Your/Namespace1/Your.Namespace1.md` file:\n\n        ```yaml\n        ---\n        uid: Your.Namespace1\n        summary: Description of the Your.Namespace1 namespace.\n        ---\n        ```\n    - See \u003chttps://dotnet.github.io/docfx/tutorial/intro_overwrite_files.html\u003e to know how it works.\n\n9. Generate your documentation:\n    - On a command line opened on your project, run:\n\n        ```bash\n        cp README.md Documentation/index.md\n        docfx Documentation/docfx.json --serve\n        ```\n\n    - The generated website will be visible at \u003chttp://localhost:8080\u003e.\n\nIf you want to have a more similar look to the Unity documentation, see this UnityFX template for DocFX:\n\u003chttps://github.com/code-beans/UnityFX\u003e.\n\n## Generate automatically your documentation\n\nIf you're using GitHub:\n\n1. Copy the `.github/workflows/documentation.yml` workflow to your Unity project:\n\n    ```diff\n      .\n    + ├── .github\n    + |   └── workflows\n    + |       └── documentation.yml\n      ├── Assets\n      ├── Documentation\n      ├── Package\n      ├── ProjectSettings\n      └── README.md\n    ```\n\n2. Next push on `main` branch will build and deploy your documentation to `https://\u003cUSERNAME\u003e.github.io/\u003cREPOSITORY\u003e/`!\n\nIf you're using GitLab, use the provided\n[`.gitlab-ci.yml`](https://github.com/NormandErwan/DocFxForUnity/blob/main/.gitlab-ci.yml).\nGenerated website is pushed to a `public/` directory. See the\n[GitLab Pages documentation](https://docs.gitlab.com/ee/user/project/pages/getting_started_part_four.html) for more\ndetails.\n\n## Troubleshooting / FAQ\n\n- DocFX outputs: `Warning:[ExtractMetadata]No project detected for extracting metadata.`\n\n    Solution: On Unity, click [Asset \u003e Open C# Project](https://docs.microsoft.com/fr-fr/visualstudio/cross-platform/media/vstu_open-csharp-project.png?view=vs-2019) to generate the required `.csproj`.\n\n- DocFX outputs: `Warning:[ExtractMetadata]No metadata is generated for Assembly-CSharp,Assembly-CSharp-Editor.`\n\n    Solution: Make sure your included your namespace in `Documentation/filterConfig.yml`:\n\n    ```yaml\n    - include:\n      uidRegex: ^Your\\.Namespace1\n      type: Namespace\n    ```\n\n- If you want to reference a specific version of Unity, change this line on your `docfx.json`:\n\n  ```json\n  \"xref\": [ \"https://normanderwan.github.io/UnityXrefMaps/\u003cversion\u003e/xrefmap.yml\" ],\n  ```\n\n  where `\u003cversion\u003e` is a Unity version in the form of `YYYY.x` (*e.g.* 2017.4, 2018.4, 2019.3).\n\n## Disclaimer\n\nThis repository is not sponsored by or affiliated with Unity Technologies or its affiliates.\n“Unity” is a trademark or registered trademark of Unity Technologies or its affiliates in the U.S. and elsewhere.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnormanderwan%2Fdocfxforunity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnormanderwan%2Fdocfxforunity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnormanderwan%2Fdocfxforunity/lists"}