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')
36Entry points (hooks) define when a plugin runs. Right now only three hooks are
37implemented. So feel free to implement a hook if it fits the behaviour of your
43Runs BEFORE the search request. Function to implement: ``pre_search``
48Runs AFTER the search request. Function to implement: ``post_search``
53Runs 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