diff options
author | Martin Fischer <martin@push-f.com> | 2021-12-22 15:51:26 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2022-01-03 07:01:49 +0100 |
commit | 8e9ad1ccc296c220d61f12926c94d98baa83e3ca (patch) | |
tree | 5ba40ba51b65c5fae48c4b008ebe85d0563b7466 /docs/conf.py | |
parent | 02e9bdf7550b5f5545bd842b24b71680960dd7a7 (diff) | |
download | searxng-8e9ad1ccc296c220d61f12926c94d98baa83e3ca.tar.gz searxng-8e9ad1ccc296c220d61f12926c94d98baa83e3ca.zip |
[enh] introduce categories_as_tabs
Previously all categories were displayed as search engine tabs.
This commit changes that so that only the categories listed under
categories_as_tabs in settings.yml are displayed.
This lets us introduce more categories without cluttering up the UI.
Categories not displayed as tabs can still be searched with !bangs.
Diffstat (limited to 'docs/conf.py')
-rw-r--r-- | docs/conf.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/docs/conf.py b/docs/conf.py index 1b78ece60..da989e62e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,14 +50,11 @@ jinja_contexts = { }, 'enabled_engine_count': sum(not x.disabled for x in searx.engines.engines.values()), 'categories': searx.engines.categories, + 'categories_as_tabs': {c: searx.engines.categories[c] for c in searx.settings['categories_as_tabs']}, }, } jinja_filters = { - 'sort_engines': - lambda engines: sorted( - engines, - key=lambda engine: (engine.about.get('language', ''), engine.name) - ) + 'group_engines_in_tab': searx.engines.group_engines_in_tab, } # Let the Jinja template in configured_engines.rst access documented_modules |