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

Added 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

Added in version 2.1: Support added for containers.

Added 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
    example.method()

sphinx-toolbox’s collapse directive

Added 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.