Collapsed content

There are a series of collapsed element capabilities supported by the Confluence builder extension. This guide will cover the available options that can be used.

Expand directive

New in version 1.3.

This extension provides a confluence_expand directive to help collapse content. For example:

.. confluence_expand::

    This content is captured inside the expand macro.

This directive will only work when using the Confluence builder. See also the Confluence expand directive.

Class hints

New in version 2.1: Support added for containers.

New in version 2.0: Support added for code blocks.

This extension provides support for managing collapsed elements when a collapse class hint is provided. If a container is defined with the style configured, the contents of the directive will be collapsed:

.. container:: collapse

    This paragraph should be collapsed.

When using the code block directive, providing a collapse style hint will also collapse the code block:

.. code-block:: python
    :class: collapse

    import example

sphinx-toolbox’s collapse directive

New in version 1.7.

When using the sphinx-toolbox extension, the collapse directive should be able to manage collapsed content. For example:

.. collapse:: Details

    This paragraph should be collapsed.

For more details, please see sphinx-toolbox’s documentation on the collapse directive.