[doc] engine-table: group engines by first category

This commit is contained in:
Martin Fischer 2021-12-20 11:17:48 +01:00
parent 26b0ecddcf
commit 1615ec4a2b
1 changed files with 7 additions and 5 deletions

View File

@ -14,12 +14,16 @@ Explanation of the :ref:`general engine configuration` shown in the table
.. jinja:: searx .. jinja:: searx
{% for category, engines in engines.items() | groupby('1.categories.0') %}
{{category}} search engines
---------------------------------------
.. flat-table:: .. flat-table::
:header-rows: 2 :header-rows: 2
:stub-columns: 1 :stub-columns: 1
* - :cspan:`5` Engines configured by default (in :ref:`settings.yml <engine settings>`) * - :cspan:`5` Engines configured by default (in :ref:`settings.yml <engine settings>`)
-
- :cspan:`3` :ref:`Supported features <engine file>` - :cspan:`3` :ref:`Supported features <engine file>`
* - Name * - Name
@ -28,13 +32,12 @@ Explanation of the :ref:`general engine configuration` shown in the table
- Disabled - Disabled
- Timeout - Timeout
- Weight - Weight
- Categories
- Paging - Paging
- Language - Language
- Safe search - Safe search
- Time range - Time range
{% for name, mod in engines.items() %} {% for name, mod in engines %}
* - `{{name}} <{{mod.about and mod.about.website}}>`_ * - `{{name}} <{{mod.about and mod.about.website}}>`_
- ``!{{mod.shortcut}}`` - ``!{{mod.shortcut}}``
@ -42,7 +45,6 @@ Explanation of the :ref:`general engine configuration` shown in the table
- {{(mod.disabled and "y") or ""}} - {{(mod.disabled and "y") or ""}}
- {{mod.timeout}} - {{mod.timeout}}
- {{mod.weight or 1 }} - {{mod.weight or 1 }}
- {{", ".join(mod.categories)}}
{% if mod.engine_type == 'online' %} {% if mod.engine_type == 'online' %}
- {{(mod.paging and "y") or ""}} - {{(mod.paging and "y") or ""}}
- {{(mod.language_support and "y") or ""}} - {{(mod.language_support and "y") or ""}}
@ -53,4 +55,4 @@ Explanation of the :ref:`general engine configuration` shown in the table
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endfor %}