bonsai-rx / docfx-tools

The standard docfx template for package documentation
MIT License
0 stars 2 forks source link

Custom API template to improve documentation user-friendliness #8

Open banchan86 opened 3 months ago

banchan86 commented 3 months ago

Motivation

The current API section for Bonsai package documentation is very C# developer centric and not as intuitive for Bonsai end users to navigate/learn from. Recently the Open Ephys Team in the process of setting up the documentation for their newest library has revamped the documentation template to target end users and implemented many features which we think would be useful. At the same time we would like to be somewhat conservative and still try to target a broader audience by retaining some bits and pieces which we think would be helpful for advanced users or developers. We have discussed this previously at https://github.com/orgs/bonsai-rx/discussions/1851 and https://github.com/bonsai-rx/docs/issues/85.

Proposed Solution

Starting from the template that was made by the Open Ephys team for the Bonsai-Onix1 website, I modified it so that it could be imported as a template within the docfx-tools submodule. In the process, I removed any Open-ephys specific package code, and added code to account for edge cases that were not present (for instance, Transform operators are not present in that library).

The features that were retained from that template:

On top of that, I added these features

Alternative Solutions

Docfx supports Bootstrap containers, which can be used to divide up the content into tabs. We could include the input/outputs as the default content for all the pages, but add these sections below that. This might be a good way to reduce information overload on the main page but still make the content available to advanced users (and avoid oversimplifying the content).

Tab mockup

Additional issues

C# specific information We should also discuss what we would want to keep, currently for some classes/operators there were no information left behind in the original template.

IncludeWorkflows - The big one, what to do which IncludeWorkflows which are a major component of packages such as Bonvision. With this template, as long as we can generate YamlManagedReference files from .bonsai files, we can package them into the API documentation. As far as I can tell, there are two methods

Both of these methods, I think I am going to need some help with as it requires C# dev knowledge.

Supplementary Solutions