Skip to content

Commit

Permalink
Add instructions to generate the documentation locally (#77)
Browse files Browse the repository at this point in the history
* Add instructions to generate the documentation locally

* Add instructions about PR rendered doc
  • Loading branch information
lesteve authored Dec 21, 2021
1 parent 2ff698c commit 3de69fe
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,37 @@ better a [Pull Request (PR)](https://github.com/jean-zay-users/jean-zay-doc/comp

We use gitter for chat, don't hesitate to get involved
[there](https://gitter.im/jean-zay-users/jean-zay-doc) and ask questions!

# See the generated doc in a PR

You can see the generated doc in a PR at the bottom of the PR page. This allows
you to double-check that the rendered HTML looks the way you intended.

It will look like the screenshot below. To view the generated doc you can click
on the "Details" link:
![](https://user-images.githubusercontent.com/1680079/146903507-d56addb6-c038-4d01-a151-933a8f261af2.png)

You can also generate the doc locally, see [this](#generating-the-doc-locally)
for instructions.

# Generating the doc locally

The documentation is using [mkdocs](https://www.mkdocs.org/) with a few
plugins. To install them:
```
pip install -e requirements.txt
```

To run `mkdocs` in development mode:
```
mkdocs serve
```

This launches a local server so that you can view the generated docs in your
browser. One very convenient feature to work on the doc is that the rendered
HTML is updated automatically when you change a `.md` file, so you can quickly
see the impact of your changes. The URL of the local server will be shown in
the output of the `mkdocs serve` command, for example:
```
INFO - [15:07:11] Serving on http://127.0.0.1:8000/
```
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mkdocs
mkdocs-material
mkdocs-macros-plugin

0 comments on commit 3de69fe

Please sign in to comment.