[doc] introduce about.language and sort engines by it
This commit is contained in:
@@ -43,6 +43,9 @@ Explanation of the :ref:`general engine configuration` shown in the table
|
||||
- ``!{{mod.shortcut}}``
|
||||
- {{mod.__name__}}
|
||||
- {{(mod.disabled and "y") or ""}}
|
||||
{%- if mod.about and mod.about.language %}
|
||||
({{mod.about.language | upper}})
|
||||
{%- endif %}
|
||||
- {{mod.timeout}}
|
||||
- {{mod.weight or 1 }}
|
||||
{% if mod.engine_type == 'online' %}
|
||||
|
||||
@@ -50,7 +50,11 @@ jinja_contexts = {
|
||||
},
|
||||
}
|
||||
jinja_filters = {
|
||||
'sort_engines': lambda engines: sorted(engines, key=lambda engine: (engine[1].disabled, engine[0]))
|
||||
'sort_engines':
|
||||
lambda engines: sorted(
|
||||
engines,
|
||||
key=lambda engine: (engine[1].disabled, engine[1].about.get('language', ''), engine[0])
|
||||
)
|
||||
}
|
||||
|
||||
# usage:: lorem :patch:`f373169` ipsum
|
||||
|
||||
Reference in New Issue
Block a user