Reputation:
How to display a warning box in the html generated using the sphinx-build
?
Warning
Do not use the directives sectnum, header and footer.
I want to show the above message as something like this:
(apologies, SO doesn't allow me to embed the image in the post here)
Please ignore the text formatting, my main aim to show a box with some text to get the attention of the user like on sphinx-doc site
Upvotes: 5
Views: 2429
Reputation: 15055
The reStructuredText syntax you want is for things called admonition directives.
That specific example exists in the documentation source:
.. warning::
Do *not* use the directives :dudir:`sectnum`, :dudir:`header` and
:dudir:`footer`.
Upvotes: 5