on master help sign in
doc(dev): reST/sphinx add tabbed views extension (sphinx_tabs.tabs)
92afe68Markus Heiser
docs/conf.py+1
@@ -60,6 +60,7 @@ extensions = [
60 "sphinxcontrib.jinja", # https://github.com/tardyp/sphinx-jinja
60 "sphinxcontrib.jinja", # https://github.com/tardyp/sphinx-jinja
61 'linuxdoc.rstFlatTable', # Implementation of the 'flat-table' reST-directive.
61 'linuxdoc.rstFlatTable', # Implementation of the 'flat-table' reST-directive.
62 'linuxdoc.kfigure', # Sphinx extension which implements scalable image handling.
62 'linuxdoc.kfigure', # Sphinx extension which implements scalable image handling.
63+ "sphinx_tabs.tabs", # https://github.com/djungelorm/sphinx-tabs
63]
64]
64
65
65intersphinx_mapping = {
66intersphinx_mapping = {
docs/dev/reST.rst+75
@@ -1148,6 +1148,81 @@ points to the name space of the python module: ``webapp``.
1148 }
1148 }
1149
1149
1150
1150
1151+Tabbed views
1152+============
1153+
1154+.. _sphinx-tabs: https://github.com/djungelorm/sphinx-tabs
1155+.. _basic-tabs: https://github.com/djungelorm/sphinx-tabs#basic-tabs
1156+.. _group-tabs: https://github.com/djungelorm/sphinx-tabs#group-tabs
1157+.. _code-tabs: https://github.com/djungelorm/sphinx-tabs#code-tabs
1158+
1159+With `sphinx-tabs`_ extension we have *tabbed views*. To provide installation
1160+instructions with one tab per distribution we use the `group-tabs`_ directive,
1161+others are basic-tabs_ and code-tabs_.
1162+
1163+
1164+.. code:: reST
1165+
1166+ .. tabs::
1167+
1168+ .. group-tab:: Linux
1169+
1170+ Linux Line 1
1171+
1172+ .. group-tab:: Mac OSX
1173+
1174+ Mac OSX Line 1
1175+
1176+ .. group-tab:: Windows
1177+
1178+ Windows Line 1
1179+
1180+ .. tabs::
1181+
1182+ .. group-tab:: Linux
1183+
1184+ Linux Line 1
1185+
1186+ .. group-tab:: Mac OSX
1187+
1188+ Mac OSX Line 1
1189+
1190+ .. group-tab:: Windows
1191+
1192+ Windows Line 1
1193+
1194+
1195+.. admonition:: Tabbed view (grouped)
1196+ :class: rst-example
1197+
1198+ .. tabs::
1199+
1200+ .. group-tab:: Linux
1201+
1202+ Linux Line 1
1203+
1204+ .. group-tab:: Mac OSX
1205+
1206+ Mac OSX Line 1
1207+
1208+ .. group-tab:: Windows
1209+
1210+ Windows Line 1
1211+
1212+ .. tabs::
1213+
1214+ .. group-tab:: Linux
1215+
1216+ Linux Line 1
1217+
1218+ .. group-tab:: Mac OSX
1219+
1220+ Mac OSX Line 1
1221+
1222+ .. group-tab:: Windows
1223+
1224+ Windows Line 1
1225+
1151
1226
1152.. _KISS: https://en.wikipedia.org/wiki/KISS_principle
1227.. _KISS: https://en.wikipedia.org/wiki/KISS_principle
1153
1228
requirements-dev.txt+1
@@ -13,3 +13,4 @@ zope.testrunner==4.5.1
13selenium==3.141.0
13selenium==3.141.0
14linuxdoc @ git+http://github.com/return42/linuxdoc.git
14linuxdoc @ git+http://github.com/return42/linuxdoc.git
15sphinx-jinja
15sphinx-jinja
16+sphinx-tabs