7.. sidebar:: Further reading ..
9 - :ref:`plugins generic`
11Plugins can extend or replace functionality of various components of searx.
18 name = 'Example plugin'
19 description = 'This plugin extends the suggestions with the word "example"'
20 default_on = False # disabled by default
22 js_dependencies = tuple() # optional, list of static js files
23 css_dependencies = tuple() # optional, list of static css files
26 # attach callback to the post search hook
27 # request: flask request object
28 # ctx: the whole local context of the post search hook
29 def post_search(request, ctx):
30 ctx['search'].suggestions.add('example')
36External plugins are standard python modules implementing all the requirements of the standard plugins.
37Plugins can be enabled by adding them to :ref:`settings.yml`'s ``plugins`` section.
38Example external plugin can be found `here <https://github.com/asciimoo/searx_external_plugin_example>`_.
43To enable your plugin register your plugin in
44searx > plugin > __init__.py.
45And at the bottom of the file add your plugin like.
46``plugins.register(name_of_python_file)``
51Entry points (hooks) define when a plugin runs. Right now only three hooks are
52implemented. So feel free to implement a hook if it fits the behaviour of your
58Runs BEFORE the search request. Function to implement: ``pre_search``
63Runs AFTER the search request. Function to implement: ``post_search``
68Runs when a new result is added to the result list. Function to implement:
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list