docs on how to build the docs and autoreload

This commit is contained in:
Abraham Toriz 2022-09-27 21:42:19 -04:00
parent 41a414d6d2
commit 22510dfcd2
No known key found for this signature in database
GPG Key ID: D5B4A746DB5DD42A
2 changed files with 16 additions and 12 deletions

View File

@ -95,16 +95,18 @@ and when I want to test some commands against such config file I just source it:
### Documentation
The docs are written using [sphinx](https://www.sphinx-doc.org/en/master/), so
first you need to install it somehow. Two options I can offer are:
The docs are written using [sphinx](https://www.sphinx-doc.org/en/master/). To
install the required dependencies enter the `docs` directory and create a virual
environment:
* using your computer's package manager. Install a package with a name similar
to `python-sphinx`.
* using [pipenv](https://duckduckgo.com/?t=ffab&q=pipenv&ia=web). Just ensure
you have python 3.9 on your computer, enter the `docs` directory and do
`pipenv install`.
virtualenv .venv
To build the docs just enter the `docs` directory and run:
then activate it and install the dependencies:
source .venv/bin/activate
pip install -r requirements.txt
To build the docs just do:
make html
@ -115,12 +117,13 @@ for the html version (output located at `docs/build/html`), or
for the man page (output located at `docs/build/man/tiempo.1`). To test the man
page you can do:
man -l docs/build/man/tiempo.1
man -l build/man/tiempo.1
If you are using pipenv to build the docs just prefix the commands with `pipenv
run` or run `pipenv shell` before running any command.
To get a live-reloaded server with the html docs do:
The contents of the docs are located in `docs/source/index.rst`,
sphinx-autobuild . build/html/
The contents of the man page are located in `docs/source/index.rst`,
formatted as
[reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html).

View File

@ -1,3 +1,4 @@
sphinx
sphinx-autobuild
tomlkit
furo