sphinx-togglebutton¶
A small sphinx extension to add “toggle button” elements to sections of your page.
Documentation: https://sphinx-togglebutton.readthedocs.io/
Install¶
pip install sphinx-togglebutton
Then, add the extension to your conf.py
:
conf.py¶
extensions = [
# ...
"sphinx_togglebutton",
]
Usage¶
dropdown
for admonitions¶
.. admonition:: Click the title to toggle
:class: dropdown
This title was made into a dropdown admonition by adding ``:class: dropdown`` to it.
Click the title to toggle
This title was made into a dropdown admonition by adding :class: dropdown
to it.
toggle
class¶
.. image:: https://media.giphy.com/media/FaKV1cVKlVRxC/giphy.gif
:class: toggle

toggle
directive¶
.. toggle::
This is a toggled content block!
This is a toggled content block!