|
1 | 1 | # Documentation
|
2 | 2 |
|
3 |
| -The documentation is available at: <http://sbi-dev.github.io/sbi> |
| 3 | +The documentation is available at: [sbi-dev.github.io/sbi](http://sbi-dev.github.io/sbi) |
4 | 4 |
|
5 | 5 | ## Building the Documentation
|
6 | 6 |
|
7 |
| -You can build the docs locally by running the following command from this subfolder: |
| 7 | +We use [`mike`](https://github.com/jimporter/mike) to manage, build, and deploy our |
| 8 | +documentation with [`mkdocs`](https://www.mkdocs.org/). To build the documentation |
| 9 | +locally, follow these steps: |
8 | 10 |
|
9 |
| -```bash |
10 |
| -jupyter nbconvert --to markdown ../tutorials/*.ipynb --output-dir docs/tutorial/ |
11 |
| -jupyter nbconvert --to markdown ../examples/*.ipynb --output-dir docs/examples/ |
12 |
| -mkdocs serve |
13 |
| -``` |
| 11 | +1. Install the documentation dependencies: |
14 | 12 |
|
15 |
| -The docs can be updated to GitHub using: |
| 13 | + ```bash |
| 14 | + python -m pip install .[doc] |
| 15 | + ``` |
16 | 16 |
|
17 |
| -```bash |
18 |
| -jupyter nbconvert --to markdown ../tutorials/*.ipynb --output-dir docs/tutorial/ |
19 |
| -jupyter nbconvert --to markdown ../examples/*.ipynb --output-dir docs/examples/ |
20 |
| -mkdocs gh-deploy |
21 |
| -``` |
| 17 | +2. Convert the current version of the documentation notebooks to markdown and build the |
| 18 | + website locally using `mike`: |
| 19 | + |
| 20 | + ```bash |
| 21 | + jupyter nbconvert --to markdown ../tutorials/*.ipynb --output-dir docs/tutorials/ |
| 22 | + jupyter nbconvert --to markdown ../examples/*.ipynb --output-dir docs/examples/ |
| 23 | + mike serve |
| 24 | + ``` |
| 25 | + |
| 26 | +### Deployment |
| 27 | + |
| 28 | +Website deployment is managed with `mike` and happens automatically: |
| 29 | + |
| 30 | +- With every push to `main`, a `dev` version of the most recent documentation is built. |
| 31 | +- With every new published **release**, the current documentation is deployed on the |
| 32 | + website. |
| 33 | + |
| 34 | +Thus, the documentation on the website always refers to the latest release, and not |
| 35 | +necessarily to the version on `main`. |
22 | 36 |
|
23 | 37 | ## Contributing FAQ
|
24 | 38 |
|
25 |
| -Create a new markdown file named `question_XX.md` in the `docs/faq` folder, where `XX` |
26 |
| -is a running index for the questions. The file should start with the question as title |
27 |
| -(i.e. starting with a `#`) and then have the answer below. Additionally, you need to |
28 |
| -add a link to your question in the markdown file `docs/faq.md`. |
| 39 | +We welcome contributions to our list of frequently asked questions. To contribute: |
| 40 | + |
| 41 | +1. Create a new markdown file named `question_XX.md` in the `docs/faq` folder, where |
| 42 | + `XX` is a running index for the questions. |
| 43 | +2. The file should start with the question as the title (i.e. starting with a `#`) and |
| 44 | + then have the answer below. |
| 45 | +3. Add a link to your question in the [`docs/faq.md`] file using the same index. |
0 commit comments