settings_plugins.rst 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. .. _settings plugins:
  2. =======
  3. Plugins
  4. =======
  5. .. sidebar:: Further reading ..
  6. - :ref:`plugins admin`
  7. - :ref:`dev plugin`
  8. - :ref:`builtin plugins`
  9. The built-in plugins can be activated or deactivated via the settings
  10. (:ref:`settings enabled_plugins`) and external plugins can be integrated into
  11. SearXNG (:ref:`settings external_plugins`).
  12. .. _settings enabled_plugins:
  13. ``enabled_plugins:`` (internal)
  14. ===============================
  15. In :ref:`plugins admin` you find a complete list of all plugins, the default
  16. configuration looks like:
  17. .. code:: yaml
  18. enabled_plugins:
  19. - 'Basic Calculator'
  20. - 'Hash plugin'
  21. - 'Self Information'
  22. - 'Tracker URL remover'
  23. - 'Unit converter plugin'
  24. - 'Ahmia blacklist'
  25. .. _settings external_plugins:
  26. ``plugins:`` (external)
  27. =======================
  28. SearXNG supports *external plugins* / there is no need to install one, SearXNG
  29. runs out of the box. But to demonstrate; in the example below we install the
  30. SearXNG plugins from *The Green Web Foundation* `[ref]
  31. <https://www.thegreenwebfoundation.org/news/searching-the-green-web-with-searx/>`__:
  32. .. code:: bash
  33. $ sudo utils/searxng.sh instance cmd bash -c
  34. (searxng-pyenv)$ pip install git+https://github.com/return42/tgwf-searx-plugins
  35. In the :ref:`settings.yml` activate the ``plugins:`` section and add module
  36. ``only_show_green_results`` from ``tgwf-searx-plugins``.
  37. .. code:: yaml
  38. plugins:
  39. - only_show_green_results
  40. # - mypackage.mymodule.MyPlugin
  41. # - mypackage.mymodule.MyOtherPlugin
  42. .. hint::
  43. ``only_show_green_results`` is an old plugin that was still implemented in
  44. the old style. There is a legacy treatment for backward compatibility, but
  45. new plugins should be implemented as a :py:obj:`searx.plugins.Plugin` class.