RST cheat sheet

Heading

=========
Heading 1
=========

Heading 2
=========

Heading 3
---------

Heading 4
~~~~~~~~~

Heading 5
*********

Heading 6
^^^^^^^^^

Note

  • Each page must have exactly one Heading 1. No less, no more.

  • The underline/overline (e.g. ===) must be at least as long as the title/heading label.

Text Style

RST

Result

**Bold**

Bold

*Italic*

Italic

List

Unordered List

RST

* Item 1.
* Item 2.
  This is the last item.

Result

  • Item 1.

  • Item 2. This is the last item.

Note

  • Items begin with *, - or +.

  • Multiple lines must be aligned. E.g. “Item 2.” and “This is the last item.” are aligned.

Ordered List

RST

#. Item 1.
#. Item 2.
   This is the last item.

Result

  1. Item 1.

  2. Item 2. This is the last item.

Note

  • Items start with any variation of #., 1., a. or A.. The use of #. is recommended.

  • Multiple lines must be aligned. E.g. “Item 2.” and “This is the last item.” are aligned.

Nested List

RST

* Item 1.

  #. Item 1A.
  #. Item 1B.

Result

  • Item 1.

    1. Item 1A.

    2. Item 1B.

Syntax

`label <URL>`_

Note

The URL can be a relative path to a file within the documentation.

Example

RST
`Viindoo website <https://viindoo.com>`_
Result

Viindoo website

Internal Page

Create a link to a page in the documentation through a relative file path.

Syntax

  1. :doc:`path_to_page`: create a link with the label being the title of the page.

  2. :doc:`label <path_to_page>`: create a link with a custom label.

Example

RST
Please refer to :doc:`../../applications/websites`.
Result

Please refer to Websites.

Internal Target

Create a link to a place in the documentation defined by a target.

Syntax

Define a target with .. _targetName:

There are two way to create a link to the target:

  1. :ref:`targetName`: create a link with the label being the target name.

  2. :ref:`label <targetName>`: create a link with a custom label.

Example

RST
Pricing
^^^^^^^

See :ref:`FAQ <contributing/internal-target/example-faq>`.

.. _contributing/internal-target/example-faq:

Frequently Asked Questions
^^^^^^^^^^^^^^^^^^^^^^^^^^

* What is the difference between On-Premise and Viindoo SaaS?
Result
Pricing

See FAQ.

Frequently Asked Questions
  • What is the difference between On-Premise and Viindoo SaaS?

Image

The image directive allows inserting images.

Syntax

  1. .. image:: path|url

  2. With optional parameters:

    .. image:: path|url
       :align: top|middle|bottom|left|center|right
       :alt: alternate text
       :height: length
       :width: length or percentage of the content width
       :scale: percentage
       :target: hyperlink reference (uri or reference name)
    

Example

RST

.. image:: img/viindoo.png
   :align: center
   :alt: Viindoo Logo
   :target: https://viindoo.com

Result

Viindoo Logo

Table

RST

+---------------+--------------+
| Header        | Header       |
+===============+==============+
| Cell          | Cell         |
+---------------+--------------+
| Cell          | Cell         |
+---------------+--------------+

Result

Header

Header

Cell

Cell

Cell

Cell

Tip

Use this table generator to build your table easier.

Alerts

See also

RST

.. seealso::
   - :doc:`../../applications/websites`

Result

See also

Note

RST

.. note::
   This is a note.

Result

Note

This is a note.

Tip

RST

.. tip::
   A small but useful piece of practical advice.

Result

Tip

A small but useful piece of practical advice.

Warning

RST

.. warning::
   This is a warning.

Result

Warning

This is a warning.

Custom

RST

.. admonition:: Title

This a custom alert.

Result

Title

This is a custom alert.

Code Block

Use .. code-block:: to insert code sample.

RST

.. code-block:: python

   class Person:
       def walk_to_work():
           pass

Result

class Person:
    def walk_to_work():
        pass

Page Metadata

There are some metadata directives that specify a behavior for the entire page. They must be placed at the top of the page.

Directive

Mean

:hide-content:

Hide content of the page when accessed.

:display-toc:

Show the table of content on the page.

:hide-local-toc:

Hide the outline sidebar (“On this page” sidebar) of the page.

:nosearch:

Exclude a page from search results.