-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Generate mkdocs.yml from mkdocs_template.yml
- Add doc about how to edit the docs
- Loading branch information
1 parent
9e7ce5e
commit 02ed8d9
Showing
5 changed files
with
135 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Editing the Orca Documentation | ||
|
||
The documentation of Orca is published at [https://docs.orca-app.dev/](https://docs.orca-app.dev/). | ||
|
||
This document explains how this website is built and deployed, and how to edit it. | ||
|
||
## Overview | ||
|
||
The documentation website is built with [mkdocs](http://mkdocs.org/) from the markdown files found in `doc/mkdocs`. | ||
|
||
Some docs like the index and quickstart guide are written manually, while the API reference is generated by a script. | ||
|
||
The `gen_doc.py` python script loads the API description found in `src/api.json`, cross-checks the type information with the C header files, and outputs the API reference markdown files. It also generates the yaml file necessary for `mkdocs` to build the navigation bar of the website. | ||
|
||
The website is build in CI and deployed through github pages when changes are pushed to the `main` branch. | ||
|
||
## Editing the Site Locally | ||
|
||
### Requirements | ||
|
||
You need a recent version of `python` (3.10 or newer) and `pip`. | ||
|
||
Install `mkdocs`: | ||
|
||
``` | ||
pip install mkdocs | ||
``` | ||
|
||
Install the `libclang` module, which is used to parse the C header files: | ||
|
||
``` | ||
pip install libclang | ||
``` | ||
|
||
### Building and Serving Locally | ||
|
||
Build the API markdown files and the `mkdocs.yml` file: | ||
|
||
``` | ||
python scripts/gen_doc.py src/api.json doc/mkdocs | ||
``` | ||
|
||
Serve the website locally: | ||
|
||
``` | ||
cd doc/mkdocs | ||
mkdocs serve | ||
``` | ||
|
||
Then visit `http://127.0.0.1:8000/` in your browser. Changes you make the markdown files should automatically trigger a reload and display the updated website. | ||
|
||
Don't forget that the API reference and the `mkdocs.yml` file are generated: | ||
|
||
- If you want to edit the API reference documentation, directly edit the documentation strings in `src/api.json`. | ||
- If you want to make changes to the `mkdocs.yml` file (for example to add a documentation section), edit `mkdocs_template.yml` file instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
site_name: Orca Documentation | ||
site_url: https://docs.orca-app.dev | ||
site_description: Official Orca Documentation | ||
|
||
copyright: Copyright © 2024 Martin Fouilleul and the Orca project contributors | ||
|
||
extra_css: | ||
- css/extra.css | ||
theme: readthedocs | ||
|
||
nav: | ||
- Home: 'index.md' | ||
- Getting Started: | ||
- Installation: 'install.md' | ||
- Quick Start: 'QuickStart.md' | ||
- User Guide: | ||
{{API_NAV}} | ||
- Developper Guide: | ||
- Building: 'building.md' | ||
- Editing the Documentation: 'documentation.md' | ||
- FAQ: 'faq.md' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters