Read the docs

Use sphinx to write a documentation, and host it on RTD, just like this page(site) you are reading.

Initial docs by sphinx

RTD Quick Start

Install sphinx with pip, then sphinx-quickstart to init.

$ pip install sphinx
$ cd /path/to/project
$ mkdir docs
$ cd docs
$ sphinx-quickstart

Edit the .rst files to write.

To make html for preview locally, run:

$ make html

Localization of Documentation

RTD Manage Translations

Create/Update translatable files:

$ make gettext


$ sphinx-build -b gettext . _build/gettext

This command above will leave the generated files under _build/gettext.

Generate .po files from source language manually:

$ sphinx-intl update -p _build/gettext -l zh_CN

Do translate, edit the .po files.


Build the documentation in target language, for preview locally:

$ sphinx-build -D language=zh_CN . _build/html/zh_CN

Multi-languages in RTD