diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..723b0f9 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "docfx": { + "version": "2.76.0", + "commands": [ + "docfx" + ] + } + } +} \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..528d61f --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,43 @@ +# Builds and publishes the documentation website to gh-pages branch +name: Build docs + +on: + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + with: + submodules: true + + - name: Setup .NET Core SDK + uses: actions/setup-dotnet@v4.0.0 + with: + dotnet-version: 8.x + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Restore NuGet Packages + run: msbuild -t:restore src\Bonsai.Gui.sln + + - name: Setup DocFX + run: dotnet tool restore + + - name: Build Documentation + run: dotnet docfx docs/docfx.json + + - name: Checkout gh-pages + uses: actions/checkout@v4.1.1 + with: + ref: gh-pages + path: gh-pages + - name: Publish to github pages + uses: peaceiris/actions-gh-pages@v3.9.3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_site + force_orphan: true \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c8ffa76 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "docs/bonsai"] + path = docs/bonsai + url = https://github.com/bonsai-rx/docfx-tools diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..c08f9ad --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +_site \ No newline at end of file diff --git a/docs/api/.gitignore b/docs/api/.gitignore new file mode 100644 index 0000000..918dd88 --- /dev/null +++ b/docs/api/.gitignore @@ -0,0 +1,3 @@ +# auto-generated files +*.yml +.manifest diff --git a/docs/articles/toc.yml b/docs/articles/toc.yml new file mode 100644 index 0000000..ef45d5b --- /dev/null +++ b/docs/articles/toc.yml @@ -0,0 +1 @@ +- href: ../index.md \ No newline at end of file diff --git a/docs/bonsai b/docs/bonsai new file mode 160000 index 0000000..8e93a91 --- /dev/null +++ b/docs/bonsai @@ -0,0 +1 @@ +Subproject commit 8e93a91590cdb751e7dc878d09ae9605cd9263f4 diff --git a/docs/docfx.json b/docs/docfx.json new file mode 100644 index 0000000..c3824f9 --- /dev/null +++ b/docs/docfx.json @@ -0,0 +1,83 @@ +{ + "metadata": [ + { + "src": [ + { + "src": "../src", + "files": [ + "**/*.csproj" + ] + } + ], + "dest": "api", + "filter": "filter.yml" + } + ], + "build": { + "content": [ + { + "files": [ + "**/*.{md,yml}" + ], + "exclude": [ + "_site/**", + "bonsai/**", + "filter.yml" + ] + } + ], + "resource": [ + { + "files": [ + "logo.svg", + "favicon.ico", + "images/**", + "workflows/**" + ] + } + ], + "output": "_site", + "overwrite": [ + { + "files": [ + "apidoc/**.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "template": [ + "default", + "modern", + "bonsai/template", + "template" + ], + "globalMetadata": { + "_appName": "Bonsai - GUI", + "_appTitle": "Bonsai.Gui", + "_enableNewTab": true, + "_enableSearch": true, + "pdf": false, + "_appFooter": "© 2024 Bonsai Foundation CIC and Contributors. Made with docfx", + "_gitContribute": { + "repo": "https://github.com/bonsai-rx/gui", + "branch": "main", + "apiSpecFolder": "docs/apidoc" + } + }, + "markdownEngineName": "markdig", + "markdownEngineProperties": { + "markdigExtensions": [ + "attributes", + "customcontainers" + ] + }, + "xref": [ + "https://bonsai-rx.org/docs/xrefmap.yml", + "https://horizongir.github.io/ZedGraph/xrefmap.yml", + "https://horizongir.github.io/reactive/xrefmap.yml" + ] + } +} \ No newline at end of file diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 0000000..5387c2d Binary files /dev/null and b/docs/favicon.ico differ diff --git a/docs/filter.yml b/docs/filter.yml new file mode 100644 index 0000000..3d3d6c9 --- /dev/null +++ b/docs/filter.yml @@ -0,0 +1,4 @@ +apiRules: +- exclude: + hasAttribute: + uid: System.ObsoleteAttribute \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..3c24e76 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,3 @@ +# Getting Started + +`Bonsai.Gui` is a collection of packages for the [Bonsai](https://bonsai-rx.org/) visual programming language for quickly composing user interfaces and real-time data visualization. \ No newline at end of file diff --git a/docs/logo.svg b/docs/logo.svg new file mode 100644 index 0000000..aaf57f7 --- /dev/null +++ b/docs/logo.svg @@ -0,0 +1,96 @@ + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/docs/template/public/main.css b/docs/template/public/main.css new file mode 100644 index 0000000..ee56505 --- /dev/null +++ b/docs/template/public/main.css @@ -0,0 +1 @@ +@import "workflow.css"; \ No newline at end of file diff --git a/docs/template/public/main.js b/docs/template/public/main.js new file mode 100644 index 0000000..fa1294e --- /dev/null +++ b/docs/template/public/main.js @@ -0,0 +1,13 @@ +import WorkflowContainer from "./workflow.js" + +export default { + defaultTheme: 'light', + iconLinks: [{ + icon: 'github', + href: 'https://github.com/bonsai-rx/gui', + title: 'GitHub' + }], + start: () => { + WorkflowContainer.init(); + } +} \ No newline at end of file diff --git a/docs/toc.yml b/docs/toc.yml new file mode 100644 index 0000000..902f309 --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,4 @@ +- name: Manual + href: articles/ +- name: Reference + href: api/ \ No newline at end of file