Skip to content

Commit 68dee06

Browse files
committed
doc: updating documentation setup guide.
Signed-off-by: Yuki Ito <[email protected]>
1 parent 4b27576 commit 68dee06

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

CONTRIBUTING.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -156,25 +156,27 @@ To format and lint the codes,
156156
tox -e fmt,lint
157157
```
158158

159-
## [Optional] Documentation setup
159+
This repository uses [mkdocs](https://github.com/mkdocs/mkdocs/tree/master) to generate a documentation from python docstring. As long as you write the docstrings for your code, the document (API references section) will be updated whenever you run `tox -e docs` command. The document will be automatically published when your PR is merged into `main` branch.
160160

161-
This repository uses [mkdocs](https://github.com/mkdocs/mkdocs/tree/master) to generate a documentation from python docstring. As long as you write docstrings for your code, the document (API references section) will be automatically updated when the code is merged into `main` branch, so there is no need for you to do anything.
162-
163-
If you want to manually edit the document, please run the following commands to setup the editing environment.
161+
To build the documentation based on your current codes, run the following command. This will outputs the documentation into `./site` folder.
164162

165163
```bash
166-
pip install mkdocs-material
167-
pip install 'mkdocstrings[python]'
164+
tox -e docs
168165
```
169166

170-
You can edit the documentation at `docs` folder (i.e. `docs/index.md`) to update the document.
171-
172-
In order to view the current documentation locally, run the following command. This will host the document at your local server.
167+
To run other mkdocs command,
173168

174169
```bash
175-
mkdocs serve
170+
tox -e docs -- <mkdocs command>
171+
172+
# For instance, serve the current documentation locally,
173+
tox -e docs -- serve
174+
...
175+
INFO - [17:35:25] Serving on http://127.0.0.1:8000/
176176
```
177177

178+
You can also manually edit or add pages to the documentation by modifying files under `./docs` folder.
179+
178180
For more information about mkdocs, please refer to their documentations:
179181

180182
- mkdocs: https://github.com/mkdocs/mkdocs/tree/master

0 commit comments

Comments
 (0)