implement HTML API reference autogeneration

This adds a jinja template to generate markdown files
(with lots of HTML mixed in) from YAML using the existing
interface_generator.py script.

The docs website layout files are modified to incorporate the
new documentation.

While previously Github Pages was automatically running
Jekyll on the docs folder, this commit adds a custom Github
workflow to compile and deploy the website to facilitate
the custom markdown generation step before Jekyll runs.
This commit is contained in:
Samuel Sadok
2020-06-10 23:03:07 +02:00
parent b88f66ab99
commit 426236dff1
11 changed files with 540 additions and 185 deletions
+8 -3
View File
@@ -258,9 +258,14 @@ To run the docs server locally:
```bash
cd docs
gem install bundler
bundle install --path ruby-bundle
bundle exec jekyll serve --host=0.0.0.0
gem install bundler # The gem command typically comes with a Ruby installation
#export PATH="$PATH:~/.gem/ruby/2.7.0/bin" # or similar (depends on OS)
rm Gemfile.lock # only if below commands cause trouble
bundle config path ruby-bundle
bundle install
mkdir -p _api _includes
python ../Firmware/interface_generator_stub.py --definitions ../Firmware/odrive-interface.yaml --template _layouts/api_documentation_template.j2 --outputs _api/'#'.md && python ../Firmware/interface_generator_stub.py --definitions ../Firmware/odrive-interface.yaml --template _layouts/api_index_template.j2 --output _includes/apiindex.html
bundle exec jekyll serve --incremental --host=0.0.0.0
```
## Releases