Admonitions

Admonitions

Admonitions are intended for including side content without significantly interrupting the document flow. There are a limited number of directives:

.. attention::
   Stop! - This in important

Attention

Stop! - This in important

.. caution::
   Beware of the trolls

Caution

Beware of the trolls

.. danger::
   Beware killer rabbits!

Danger

Beware killer rabbits!

.. error::
   There is currently a problem.

Error

There is currently a problem.

.. hint::
   Maybe read the docs.

Hint

Maybe read the docs.

.. important::
   Important info

Important

Important info

.. note::
   This project is under active development.

Note

This project is under active development.

.. tip::
   Use mkdocs instead

Tip

Use mkdocs instead

.. warning::
   This may not work

Warning

This may not work

.. seealso::
   More info here

See also

More info here

Deprecated since version 3.1: Use spam() instead.

.. todo::
   This needs fixing

Custom Admonitions

Custom admonitions are possible using docutils i.e.:

.. admonition:: Limitation

   Description of the limitations

Limitation

Description of the limitations

The class attribute can be set to another admonition type:

.. admonition:: Limitation
   :class: hint

   Description of the limitations

Limitation

Description of the limitations

The class attribute can be set to another admonition type:

.. admonition:: Dropdown
   :class: dropdown, toggle-shown

   Remove toggle-shown class to start closed

This requires the sphinx_togglebutton extention to be installed.

It is also possible to customise using css:

.admonition.external-link {
  border-color: rgb(190, 93, 130);
  background-color: rgb(190, 93, 130, 0.25);
}
.admonition.external-link > .admonition-title {
  background-color: rgba(190, 93, 130, 0.5);
  border-color: rgb(190, 93, 130);
}
.admonition.external-link > .admonition-title::before {
  content: "\f0c1";
}
.. admonition:: Open Data Services
   :class: external-link

   Link to the website: `Open Data Services <https://opendataservices.coop/>`_