About this documentation¶
This document focuses on style-guide and a short reference. It is a kind of coding standards applied to documentation files. It is not about documentation content.
|Html, as Zip||http://readthedocs.org/projects/mosa/downloads/htmlzip/latest|
RestructuredText with Sphinx directives¶
Use only lowercase alphanumeric characters and
- (minus) symbol.
Suffix filenames with the
.rst extension, so GitHub can render them.
Indent with 2 spaces.
toctreedirective requires a 3 spaces indentation.
Two blank lines before overlined sections, i.e. before H1 and H2. One blank line before other sections. See Headings for an example.
One blank line to separate directives.
Some text before. .. note:: Some note.
Exception: directives can be written without blank lines if they are only one line long.
.. note:: A short note.
Technically, there’s no limitation. But if possible, limit all lines to a maximum of 120 characters.
Use the following symbols to create headings:
As an example:
################## H1: document title ################## Introduction text. ********* Sample H2 ********* Sample content. ********** Another H2 ********** Sample H3 ========= Sample H4 --------- Sample H5 ^^^^^^^^^ Sample H6 """"""""" And some text.
If you need more than heading level 4 (i.e. H5 or H6), then you should consider creating a new document.
There should be only one H1 in a document.
Code blocks and text boxes¶
code-block directive and specify the programming language. As
.. code-block:: python import this
.. note:: Note (blue box). possible values: attention, caution, danger, error, hint, important, note, tip, warning, admonition. Every type has its own color.
will loook like:
Note (blue box). possible values: attention, caution, danger, error, hint, important, note, tip, warning, admonition. Every type has its own color.
Table as CSV
.. csv-table:: Title of CSV table :header: "Column 1", "Column 2", "Column 3" "Sampel Row 1", Cell, Cell "Sampel Row 2", Cell, "Cell with multiple Words"
You can skip quotes, of cell content conains only a single word
Table as flat list
.. list-table:: Title of table as flat list :header-rows: 1 * - Column 1 - Column 2 - Column 3 * - Row 1 - Cell - Cell * - Row 2 - Cell - Cell
:header-rows: defines the number of header rows. Skip this line, if you do not need a header.
Why is my document not linked within the table of contents?
- put the filename into index.rst. Omit the
- The document requires at least one section. Section names are the label that are used for the table of content.
After commiting, the documentation will not update
- The build process of the documentation takes round about 1-2 minutes.
- You can check the status here: Builds
- Check the status if the build fails
Documentation is updating, but some content is missing or malformed
- There might be some parsing errors or warnings.
Go to Builds and click on
Raw view. Check the build output for warnings and fix them.