Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/box2d-docs-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build Box2D Docs for GitHub Pages

env:
COMMON_SETTINGS_PATH: docs/docfx.json

on:
workflow_dispatch:

jobs:
publish-docs:
runs-on: windows-latest

steps:
- name: .NET SDK Setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x

- name: Checkout Box2D.NET
uses: actions/checkout@v4

- name: Run Box2D.NET.CommentConverter.csproj
run: dotnet run --project tools/Box2D.NET.CommentConverter/Box2D.NET.CommentConverter.csproj --configuration Release

- name: Install DocFX
# This installs the latest version of DocFX and may introduce breaking changes
# run: dotnet tool update -g docfx
# This installs a specific, tested version of DocFX.
run: dotnet tool update -g docfx --version 2.78.2

- name: Build Box2D.NET API Docs
run: docfx metadata ${{ env.COMMON_SETTINGS_PATH }}

- name: Build Box2D.NET Docs
run: docfx build ${{ env.COMMON_SETTINGS_PATH }}

- name: Deploy
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
publish_branch: gh-pages
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Ignore Visual Studio temporary files, build results, and
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
Expand Down Expand Up @@ -399,3 +399,7 @@ FodyWeavers.xsd
.idea/
imgui.ini
settings.ini

# DocFX API Generated Pages
docs/api/*
docs/_site/*
63 changes: 63 additions & 0 deletions docs/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
"metadata": [
{
"src": [
{
"src": "..",
"files": [
"src/Box2D.NET/Box2D.NET.csproj"
]
}
],
"dest": "api"
}
],
"build": {
"content": [
{
"files": [
"**/*.{md,yml}"
],
"exclude": [
"_site/**"
]
}
],
"resource": [
{
"files": [
"favicon-32x32.png",
"favicon-16x16.png",
"images/**"
]
}
],
"output": "_site",
"template": [
"default",
"modern",
"template"
],
"fileMetadata": {
"_appTitle": {
"api/**/*.md": "Box2D API",
"api/**/*.yml": "Box2D API"
}
},
"globalMetadata": {
"_appName": "",
"_appTitle": "Box2D Docs",
"_appLogoPath": "images/box2d_logo.svg",
"_appFaviconPath": "favicon-32x32.png",
"_enableSearch": true,
"pdf": false,
"_gitContribute": {
"repo": "https://github.com/ikpil/Box2D.NET",
"branch": "master"
},
"_gitUrlPattern": "github",
"_gitRepo": "https://github.com/ikpil/Box2D.NET"
}
}
}
4 changes: 4 additions & 0 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
_disableToc: false
---
# Box2D.NET Docs
8 changes: 8 additions & 0 deletions docs/docs/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- name: 📚 Docs
href: index.md
- name: Original Box2D
href: https://box2d.org/
- name: Overview
href: https://box2d.org/documentation/index.html
- name: FAQ
href: https://box2d.org/documentation/md_faq.html
Binary file added docs/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
126 changes: 126 additions & 0 deletions docs/images/box2d_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
_disableToc: false
---
[!INCLUDE [readme](../readme.md)]
5 changes: 5 additions & 0 deletions docs/template/public/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information. */

.navbar-brand #logo {
height: 56px;
}
17 changes: 17 additions & 0 deletions docs/template/public/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const app = {
languageDropdownCreated: false,
iconLinks: [
{
icon: 'github',
href: 'https://github.com/ikpil/Box2D.NET',
title: 'GitHub'
},
{
icon: 'discord',
href: 'https://github.com/ikpil/Box2D.NET',
title: 'Discord'
}
]
};

export default app;
4 changes: 4 additions & 0 deletions docs/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: 📚 Docs
href: docs/index.md
- name: 🔧 API
href: api/
10 changes: 10 additions & 0 deletions tools/Box2D.NET.CommentConverter/Box2D.NET.CommentConverter.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Loading