sphinx
sphinx copied to clipboard
Set conditional tags for use during inclusion
I would like to have a common file that will be included in multiple places in my docs. I want to be able to use .. only::
directives in that common file, and have tags set differently by different .. include:
directives so that the content is customize for each place it is included.
For example (with invented :tags:
syntax):
.. common.rst
This is for everyone
.. only:: red
Hello red team!
.. only:: blue
Hello blue team!
Red team
========
This is for red team.
.. include:: common.rst
:tags: red