Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New: Collapsible sections in Docs #4223

Closed
wants to merge 9 commits into from
4 changes: 3 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
"github",
"seo",
"components",
"sitemap",
"sitemap",

'sphinx_toolbox.collapse',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
41 changes: 41 additions & 0 deletions guides/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,47 @@ adhere to the following order:

Note that a blank line is *required* after every ``code-block`` directive.

- **Collapsible section**: To add a collapsible section, use the ``collapse`` directive:

.. code-block:: rst

.. collapse:: Details

Something small enough to escape casual notice.

.. collapse:: Open

:open:

This section is open by default.

.. collapse:: A long code block

.. code-block:: python

print("Not really")

.. collapse:: Details

Something small enough to escape casual notice.

.. collapse:: Open

:open:

This section is open by default.

.. collapse:: A long code block

.. code-block:: python

print("Not really")

.. note::

Note that a blank line is *required* after every ``collapse`` directive.


- **Images**: Use the ``figure`` directive to display an image:

.. code-block:: rst
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
sphinx==5.0.1
sphinx-autobuild==2021.3.14
sphinx-toolbox==3.8.0
Loading