0

Following my other question Show/hide part of text (question/answer) in sphinx file what I would like to do is to export an html (or whatever format) without this tag (e.g. an html without all the admonition directives.

I read the .. only:: directive but it seems that you I can exclude an entire page from an html and let it in the latex for example.

matteo
  • 4,683
  • 9
  • 41
  • 77
  • Did you actually try this? Did you try to indent content under the `only` directive? You can nest directives by indenting them under one another. – Steve Piercy Jan 25 '20 at 15:04
  • Didn't know that I can nest directives. Thanks! If you put you comment as a reply I will mark it as solution. – matteo Jan 27 '20 at 08:40

1 Answers1

1

You can nest directives by indenting them under one another.

.. only:: html

    ..  admonition:: Solution
        :class: toggle

        * Go to the dexterity-controlpanel (http://localhost:8080/Plone/@@dexterity-types)
        * Click on *Page* (http://127.0.0.1:8080/Plone/dexterity-types/Document)
        * Select the tab *Behaviors* (http://127.0.0.1:8080/Plone/dexterity-types/Document/@@behaviors)
        * Check the box next to *Lead Image* and save.
Steve Piercy
  • 13,693
  • 1
  • 44
  • 57