user9712230
user9712230

Reputation:

Displaying a warning box on pages generated by python-sphinx

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: image of warning message in box (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

Answers (1)

Steve Piercy
Steve Piercy

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

Related Questions