Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docfx documentation infrastructure #19

Merged
merged 2 commits into from
Apr 11, 2024
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
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"docfx": {
"version": "2.76.0",
"commands": [
"docfx"
]
}
}
}
43 changes: 43 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
submodules: true

- name: Setup .NET Core SDK
uses: actions/[email protected]
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/[email protected]
with:
ref: gh-pages
path: gh-pages
- name: Publish to github pages
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
force_orphan: true
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "docs/bonsai"]
path = docs/bonsai
url = https://github.com/bonsai-rx/docfx-tools
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_site
3 changes: 3 additions & 0 deletions docs/api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# auto-generated files
*.yml
.manifest
1 change: 1 addition & 0 deletions docs/articles/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- href: ../index.md
1 change: 1 addition & 0 deletions docs/bonsai
Submodule bonsai added at 8e93a9
83 changes: 83 additions & 0 deletions docs/docfx.json
Original file line number Diff line number Diff line change
@@ -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": "&copy; 2024 Bonsai Foundation CIC and Contributors. Made with <a href=\"https://dotnet.github.io/docfx\">docfx</a>",
"_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"
]
}
}
Binary file added docs/favicon.ico
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/filter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiRules:
- exclude:
hasAttribute:
uid: System.ObsoleteAttribute
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -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.
96 changes: 96 additions & 0 deletions docs/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/template/public/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "workflow.css";
13 changes: 13 additions & 0 deletions docs/template/public/main.js
Original file line number Diff line number Diff line change
@@ -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();
}
}
4 changes: 4 additions & 0 deletions docs/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Manual
href: articles/
- name: Reference
href: api/
Loading