This technical document is in the format of reStructuredText and Markdown/CommonMark. It's generated using Sphinx.
- Install Python 3.5+ (for Sphinx).
Sphinx is a tool that makes it easy to create documentation.
Sphinx_intl is a useful tool for internationalization and localization.
-
On Windows, you should open Command Prompt (⊞Win-r and type cmd) and run the same command.
pip install sphinx sphinx_intl
-
After installation, type
phinx-build --version
on the command prompt. If everything worked fine, you will see the version number for the Sphinx package you just installed. -
Sphinx comes with a script called sphinx-quickstart that sets up a source directory and creates a default conf.py with the most useful configuration values from a few questions it asks you. To use this, run:
cd /path/to/project mkdir docs cd docs sphinx-quickstart
We will be presented with a series of questions, the answer to which can depend from project to project.
Now we can see that some foldes and files have been autogenerated for us:
conf.py
: This is the file where all Sphinx configuration settings (including the settings we specified during the sphinx-quickstart setup) are specified.index.rst
: This is the file which tells Sphinx how to render our index.html page._static
: image, script, etc._build
: This is the directory where the output of any builder is stored when amake <builder>
is called.
You can use Markdown and reStructuredText in the same Sphinx project.
-
Run the following command (using Command Prompt):
pip install recommonmark
-
Then in your
conf.py
:#extensions = ['sphinx.ext.autodoc'] extensions = ['recommonmark']
Note: You should skip this step(2). The above code is already in you
conf.py
.
warning: Markdown doesn’t support a lot of the features of Sphinx, like inline markup and directives. However, it works for basic prose content. reStructuredText is the preferred format for technical documentation
Sphinx_rtd_theme is a html theme.
-
Run the following command (using Command Prompt):
pip install sphinx_rtd_theme
-
Add this theme extension module in
conf.py
html_theme = 'alabaster'
to
# html_theme = 'alabaster' import sphinx_rtd_theme html_theme = "sphinx_rtd_theme" html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
Note: You should skip this step(2). The above code is already in you
conf.py
.
Plantuml is a library for generating UML diagrams from a simple text markup language.
-
On Windows, run the following command (using Command Prompt):
pip install plantweb
-
Add this UML extension modules in
conf.py
:extensions = ['plantweb.directive']
Note: You may skip this step(2). The above code is already in you
conf.py
.
You can following this command to build HTML document at docs\
:
make html
Your index.rst
has been built into index.html
in your documentation output directory (typically _build/html/index.html
). Open this file in your web browser to see your docs.
This project is released under Apache 2.0 License.