Admonitions are a great way to bring the attention of readers. It is a special kind of directives. There are many different types of admonitions, including the reStructuredText’s built-in admonitions, and directives provided by Sphinx which looks like admonitions.
Here lists all the built-in admonitions in reST. The admonition syntax in reST accepts no arguments, and most of the time no options:
.. admonition-name:: content in admonition
Here is an example of the
.. note:: ``note`` is a special directive for admonition.
note is a special directive for admonition.
Shibuya is a well designed Sphinx theme.
Livereload is using tornado for the server.
A non-sustainable project is no trustworthy to use.
One can not be divided by zero.
Authlib helps you build an OpenID Connect server.
I sometimes write blog posts on https://lepture.com
Typlog is created by me.
Become a sponsor to keep this project sustainable.
Do not ask your own questions in GitHub issues.
.. admonition:: directive accepts a custom title:
.. admonition:: Admonition title here Content of the admonition
Here is an example of the generic admonition:
.. admonition:: Typlog Typlog can help you hosting your blogs and podcasts.
By default, a generic admonition is decorated with your theme color.
But you can customize the result with a
:class: option. With the
above admonitions as the class name, the result would look like the
.. admonition:: Typlog :class: hint Typlog can help you hosting your blogs and podcasts.
Here lists the directives added by Sphinx which looks like admonitions.
The blog post about Shibuya by lepture.
todo admonition is enabled by
sphinx.ext.todo, please add
this extension in the
extensions = [ "sphinx.ext.todo", ] todo_include_todos = True
Fix this UI issue later.
Here lists the version related directives. These directives are not admonitions, but in Shibuya theme, they look like admonitions.
.. versionadded:: v3 Built-in reST renderer is added in Mistune.
New in version v3: Built-in reST renderer is added in Mistune.
.. versionchanged:: v2 The ``jose`` module is moved out of Authlib.
Changed in version v2: The
jose module is moved out of Authlib.
.. deprecated:: 2.7 This version is no longer maintained, please upgrade to v3.
Deprecated since version 2.7: This version is no longer maintained, please upgrade to v3.
It is possible to add admonitions into admonitions. Take an example:
.. note:: An admonition can contain another admonition. .. warning:: But is is not a really good idea. .. danger:: It's distracting. It can also be confusing. And it looks pretty weird.
An admonition can contain another admonition.
But is is not a really good idea.
It can also be confusing.
And it looks pretty weird.