Describe tab conditionalization

Add details of how to repeat tabbed content conditionally for builds that do not support
tabs.

Change-Id: I2201a4f29a300ab501deccaecfae5dd209424d3b
Signed-off-by: Ron Stone <ronald.stone@windriver.com>
This commit is contained in:
Ron Stone 2025-04-16 15:34:01 +00:00
parent a9a86eb9da
commit 50081cc5dd

View File

@ -785,6 +785,77 @@ Try it out for yourself here:
Windows tab content - tab set 3
***********************************
Considerations for alternate builds
***********************************
It is important to make allowances for builds of StarlingX documentation in
contexts that may not support tabs, such as by other parties or for print
output. To support such environments, the use of tabs must be conditionalized
and the related content repeated for non tab scenarios. The following sample
illustrates the standard way to achieve this:
.. code-block::
.. only:: starlingx and html
.. tabs::
.. group-tab:: Bare Metal
.. begin-install-prereqs-bm
.. include:: /shared/_includes/installation-prereqs.rest
:start-after: begin-install-prereqs
:end-before: end-install-prereqs
.. end-install-prereqs-bm
.. group-tab:: Virtual
.. begin-install-prereqs-virt
Several pre-requisites must be completed prior to starting the |prod|
installation.
Before attempting to install |prod|, ensure that you have the the
|prod| host installer ISO image file.
Get the latest |prod| ISO from the `StarlingX mirror
<https://mirror.starlingx.cengn.ca/mirror/starlingx/release/latest_release/debian/monolithic/outputs/iso/>`__.
Alternately, you can get an older release ISO from `here <https://mirror.starlingx.cengn.ca/mirror/starlingx/release/>`__.
.. end-install-prereqs-virt
.. only:: partner and (html or latex)
**********
Bare Metal
**********
.. include:: /deploy_install_guides/release/bare_metal/aio_duplex_install_kubernetes.rst
:start-after: begin-install-prereqs-bm
:end-before: end-install-prereqs-bm
*******
Virtual
*******
.. include:: /deploy_install_guides/release/bare_metal/aio_duplex_install_kubernetes.rst
:start-after: begin-install-prereqs-virt
:end-before: end-install-prereqs-virt
In this example, the tabbed content is conditionalized to only appear in
StarlingX HTML output (``.. only:: starlingx and html``).
The ``.. begin-install-prereqs-bm``, ``.. end-install-prereqs-bm``, ``..
begin-install-prereqs-virt`` and ``.. end-install-prereqs-virt`` comments allow
the contents of the ``Bare Netal`` and ``Virtual`` tabs to be included
conditionally in other builds that do not support tabs. In this example the
content is conditionalized in the ``.. only:: partner and (html or latex)``
block.
.. end-using-tabbed-content
------------------------
@ -1183,9 +1254,9 @@ Results in:
2. Red
1. Blue
3. Blue
2. Green
4. Green
To avoid this, use substitute .. pre\ |html-comment|-include:: for ``.. include::``