summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2019-12-26 10:26:12 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2019-12-26 10:26:12 +0100
commit92afe68d6532c93d455b7eafb827cc18b812a327 (patch)
tree2a9ed2803ee11db92262b8b04b3f6745f3e07760 /docs
parent62505f8982c2bc2cae5456a7ab50932fea580cc4 (diff)
downloadsearxng-92afe68d6532c93d455b7eafb827cc18b812a327.tar.gz
searxng-92afe68d6532c93d455b7eafb827cc18b812a327.zip
doc(dev): reST/sphinx add tabbed views extension (sphinx_tabs.tabs)
See issue #1785: idea: in the doc, provide installation instructions with one tab per distrubution preview (don't bookmark): https://return42.github.io/searx/dev/reST.html#tabbed-views Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py1
-rw-r--r--docs/dev/reST.rst75
2 files changed, 76 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py
index e49562a33..b07e020d1 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -60,6 +60,7 @@ extensions = [
"sphinxcontrib.jinja", # https://github.com/tardyp/sphinx-jinja
'linuxdoc.rstFlatTable', # Implementation of the 'flat-table' reST-directive.
'linuxdoc.kfigure', # Sphinx extension which implements scalable image handling.
+ "sphinx_tabs.tabs", # https://github.com/djungelorm/sphinx-tabs
]
intersphinx_mapping = {
diff --git a/docs/dev/reST.rst b/docs/dev/reST.rst
index c6aa990f2..edd7e19b7 100644
--- a/docs/dev/reST.rst
+++ b/docs/dev/reST.rst
@@ -1148,6 +1148,81 @@ points to the name space of the python module: ``webapp``.
}
+Tabbed views
+============
+
+.. _sphinx-tabs: https://github.com/djungelorm/sphinx-tabs
+.. _basic-tabs: https://github.com/djungelorm/sphinx-tabs#basic-tabs
+.. _group-tabs: https://github.com/djungelorm/sphinx-tabs#group-tabs
+.. _code-tabs: https://github.com/djungelorm/sphinx-tabs#code-tabs
+
+With `sphinx-tabs`_ extension we have *tabbed views*. To provide installation
+instructions with one tab per distribution we use the `group-tabs`_ directive,
+others are basic-tabs_ and code-tabs_.
+
+
+.. code:: reST
+
+ .. tabs::
+
+ .. group-tab:: Linux
+
+ Linux Line 1
+
+ .. group-tab:: Mac OSX
+
+ Mac OSX Line 1
+
+ .. group-tab:: Windows
+
+ Windows Line 1
+
+ .. tabs::
+
+ .. group-tab:: Linux
+
+ Linux Line 1
+
+ .. group-tab:: Mac OSX
+
+ Mac OSX Line 1
+
+ .. group-tab:: Windows
+
+ Windows Line 1
+
+
+.. admonition:: Tabbed view (grouped)
+ :class: rst-example
+
+ .. tabs::
+
+ .. group-tab:: Linux
+
+ Linux Line 1
+
+ .. group-tab:: Mac OSX
+
+ Mac OSX Line 1
+
+ .. group-tab:: Windows
+
+ Windows Line 1
+
+ .. tabs::
+
+ .. group-tab:: Linux
+
+ Linux Line 1
+
+ .. group-tab:: Mac OSX
+
+ Mac OSX Line 1
+
+ .. group-tab:: Windows
+
+ Windows Line 1
+
.. _KISS: https://en.wikipedia.org/wiki/KISS_principle