This directory contains the sources for Parsec docs.
Parsec docs are written in reStructuredText (.rst) format.
Sphinx is used to build the docs in multiple output formats (such as HTML and PDF).
There are two ways to install dependencies:
-
Using Poetry
poetry install
Note You'll need extra dependencies to build PDF docs (via
latexmk
), see Dockerfile.
-
Using Docker
-
Build Docker image:
docker build -t parsec-docs .
-
Run a container:
docker run --rm -it -v $(pwd):/data parsec-docs
Note The current working directory must be the local path to parsec-cloud repo. It is mounted in
/data
in the container. This means that builds started from the container will be available in your local repo under_build
directory.
-
Build HTML docs with:
make html
To see the list of available output formats:
make
Translations are based on Sphinx Internationalization.
-
Extract text from docs
make gettext
-
Create/update
.po
files for translationmake intl-fr
-
Translate
.po
files (manually or with a tool like Poedit) -
Make sure to wrap files before commit
make wrap
-
To build translations locally (
.po -> .mo
).make -e SPHINXOPTS="-D language='fr'" html
Note that you should only commit the .po
files (not .mo
files).