3.2. Building documentation¶
Tarantool documentation is built using a simplified markup system named
(see http://sphinx-doc.org). You can build a local version of this documentation
and you can contribute to Tarantool’s version.
You need to install these packages:
git(a program for downloading source repositories)
CMakeversion 2.8 or later (a program for managing the build process)
Pythonversion greater than 2.6 – preferably 2.7 – and less than 3.0 (Sphinx is a Python-based tool)
LaTeX(a system for document preparation, the installable package name usually begins with the word texlive or tetex, on Ubuntu the name is texlive-latex-base)
You need to install these Python modules:
See more details about installation in the build-from-source section of this documentation.
gitto download the latest source code of this documentation from the GitHub repository
tarantool/doc, branch 1.7. For example, to download to a local directory named
git clone https://github.com/tarantool/doc.git ~/tarantool-doc
CMaketo initiate the build.
cd ~/tarantool-doc make clean # unnecessary, added for good luck rm CMakeCache.txt # unnecessary, added for good luck cmake . # initiate
Build a local version of the documentation.
makecommand with an appropriate option to specify which documentation version to build.
cd ~/tarantool-doc make sphinx-html # multi-page English version make sphinx-singlehtml # one-page English version make sphinx-html-ru # multi-page Russian version make sphinx-singlehtml-ru # one-page Russian version make all # all versions plus the entire web-site
Documentation will be created in subdirectories of
/output/en(files of the English version)
/output/ru(files of the Russian version)
The entry point for each version is the
index.htmlfile in the appropriate directory.
Set up a web-server.
Run the following command to set up a web-server. The example below is for Ubuntu, but the procedure is similar for other supported operating systems. Make sure to run it from the documentation output folder,
output/ru, as in the example below:
cd ~/tarantool-doc/output/en python -m SimpleHTTPServer 8000
Open your browser and enter
127.0.0.1:8000/docinto the address box. If your local documentation build is valid, the manual will appear in the browser.
To contribute to documentation, use the
.rstformat for drafting and submit your updates as a pull request via GitHub.
To comply with the writing and formatting style, use the guidelines provided in the documentation, common sense and existing documents.
- If you suggest creating a new documentation section (a whole new page), it has to be saved to the relevant section at GitHub.
- If you want to contribute to localizing this documentation (for example into
Russian), add your translation strings to
.pofiles stored in the corresponding locale directory (for example
/locale/ru/LC_MESSAGES/for Russian). See more about localizing with Sphinx at http://www.sphinx-doc.org/en/stable/intl.html