summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-12-28 12:51:29 +0100
committerMartin Fischer <martin@push-f.com>2022-01-03 07:01:49 +0100
commit02e9bdf7550b5f5545bd842b24b71680960dd7a7 (patch)
tree37ab0abc146934562bab34eab61726b4382838d7 /docs/conf.py
parentd8af94b7212b7825296117c661f04bfe4129bc99 (diff)
downloadsearxng-02e9bdf7550b5f5545bd842b24b71680960dd7a7.tar.gz
searxng-02e9bdf7550b5f5545bd842b24b71680960dd7a7.zip
[doc] engine tables: show engines in all categories
Previously the documentation grouped the engines by their first category so e.g. YouTube and Invidious were only shown in the in the videos section but not in the music section. This commit fixes this by iterating over searx.engines.categories, which also has the added benefit that the sections are now in the same order as the tabs in the user interface.
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/conf.py b/docs/conf.py
index d4fc50735..1b78ece60 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -40,6 +40,7 @@ exclude_patterns = ['build-templates/*.rst']
import searx.engines
import searx.plugins
searx.engines.load_engines(searx.settings['engines'])
+
jinja_contexts = {
'searx': {
'engines': searx.engines.engines,
@@ -48,13 +49,14 @@ jinja_contexts = {
'node': os.getenv('NODE_MINIMUM_VERSION')
},
'enabled_engine_count': sum(not x.disabled for x in searx.engines.engines.values()),
+ 'categories': searx.engines.categories,
},
}
jinja_filters = {
'sort_engines':
lambda engines: sorted(
engines,
- key=lambda engine: (engine[1].about.get('language', ''), engine[0])
+ key=lambda engine: (engine.about.get('language', ''), engine.name)
)
}