Option to "enable toggleable sections globally" without directives
Created originally on Bitbucket by Anonymous
BACKGROUND
I have a project where I would like to have "toggleable sections" enabled by default for ALL level 2 and 3 headings/sections.
Currently, I use the custom classes "html-toggle expanded" provided by the cloud theme. But this causes my source files to be riddled with directives, like this:
#!restructuredtext
.. rst-class:: html-toggle expanded
Level 2 heading
===============
This section can be toggled on/off.
.. rst-class:: html-toggle expanded
Level 3 heading
---------------
This section can be toggled on/off.
.. rst-class:: html-toggle expanded
Level 3 heading
---------------
This section can be toggled on/off.
REQUEST
I would like to have an option, to make ALL level 2/3 headings toggleable (globally for the whole project) by default, without using these directives.
Can this be done? (I would assume that this might require a Sphinx extension that adds the appropriate classes to all level 2/3 headings.)
SEE ALSO
Toggleable section are described here: http://pythonhosted.org/cloud_sptheme/cloud_theme.html#features
Additional usage notes with examples can be found here: http://pythonhosted.org/cloud_sptheme/cloud_theme.html#toggleable-sections