Browse Source

[fix] various issues in the documentation

Closes: https://github.com/searxng/searxng/issues/4370
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Markus Heiser 3 months ago
parent
commit
2e0abc9310

+ 1 - 1
docs/admin/settings/index.rst

@@ -13,7 +13,7 @@ Settings
    :maxdepth: 2
    :maxdepth: 2
 
 
    settings
    settings
-   settings_engine
+   settings_engines
    settings_brand
    settings_brand
    settings_general
    settings_general
    settings_search
    settings_search

+ 21 - 5
docs/admin/settings/settings_engine.rst → docs/admin/settings/settings_engines.rst

@@ -1,14 +1,30 @@
-.. _settings engine:
+.. _settings engines:
 
 
-===========
-``engine:``
-===========
+============
+``engines:``
+============
 
 
 .. sidebar:: Further reading ..
 .. sidebar:: Further reading ..
 
 
    - :ref:`configured engines`
    - :ref:`configured engines`
    - :ref:`engines-dev`
    - :ref:`engines-dev`
 
 
+
+In the section ``engines:`` is a list of the engines that are to be made
+available in the instance.  Each list entry is in turn a key/value mapping.
+
+.. code:: yaml
+
+   engines:
+
+     - name: dummy.online
+       engine: dummy
+       ..
+     - name: dummy.offline
+       engine: dummy-offline
+       ..
+     ..
+
 In the code example below a *full fledged* example of a YAML setup from a dummy
 In the code example below a *full fledged* example of a YAML setup from a dummy
 engine is shown.  Most of the options have a default value or even are optional.
 engine is shown.  Most of the options have a default value or even are optional.
 
 
@@ -19,7 +35,7 @@ engine is shown.  Most of the options have a default value or even are optional.
 
 
 .. code:: yaml
 .. code:: yaml
 
 
-   - name: example engine
+   - name: example
      engine: example
      engine: example
      shortcut: demo
      shortcut: demo
      base_url: 'https://{language}.example.com/'
      base_url: 'https://{language}.example.com/'

+ 2 - 2
docs/admin/settings/settings_outgoing.rst

@@ -43,7 +43,7 @@ Communication with search engines.
   Global timeout of the requests made to others engines in seconds.  A bigger
   Global timeout of the requests made to others engines in seconds.  A bigger
   timeout will allow to wait for answers from slow engines, but in consequence
   timeout will allow to wait for answers from slow engines, but in consequence
   will slow SearXNG reactivity (the result page may take the time specified in the
   will slow SearXNG reactivity (the result page may take the time specified in the
-  timeout to load).  Can be override by ``timeout`` in the :ref:`settings engine`.
+  timeout to load).  Can be override by ``timeout`` in the :ref:`settings engines`.
 
 
 ``useragent_suffix`` :
 ``useragent_suffix`` :
   Suffix to the user-agent SearXNG uses to send requests to others engines.  If an
   Suffix to the user-agent SearXNG uses to send requests to others engines.  If an
@@ -105,6 +105,6 @@ Communication with search engines.
 
 
 ``using_tor_proxy`` :
 ``using_tor_proxy`` :
   Using tor proxy (``true``) or not (``false``) for all engines.  The default is
   Using tor proxy (``true``) or not (``false``) for all engines.  The default is
-  ``false`` and can be overwritten in the :ref:`settings engine`
+  ``false`` and can be overwritten in the :ref:`settings engines`
 
 
 
 

+ 3 - 3
docs/conf.py

@@ -143,10 +143,10 @@ suppress_warnings = ['myst.domains']
 intersphinx_mapping = {
 intersphinx_mapping = {
     "python": ("https://docs.python.org/3/", None),
     "python": ("https://docs.python.org/3/", None),
     "babel" : ("https://babel.readthedocs.io/en/latest/", None),
     "babel" : ("https://babel.readthedocs.io/en/latest/", None),
-    "flask": ("https://flask.palletsprojects.com/", None),
+    "flask": ("https://flask.palletsprojects.com/en/stable/", None),
     "flask_babel": ("https://python-babel.github.io/flask-babel/", None),
     "flask_babel": ("https://python-babel.github.io/flask-babel/", None),
-    # "werkzeug": ("https://werkzeug.palletsprojects.com/", None),
-    "jinja": ("https://jinja.palletsprojects.com/", None),
+    "werkzeug": ("https://werkzeug.palletsprojects.com/en/stable/", None),
+    "jinja": ("https://jinja.palletsprojects.com/en/stable/", None),
     "linuxdoc" : ("https://return42.github.io/linuxdoc/", None),
     "linuxdoc" : ("https://return42.github.io/linuxdoc/", None),
     "sphinx" : ("https://www.sphinx-doc.org/en/master/", None),
     "sphinx" : ("https://www.sphinx-doc.org/en/master/", None),
     "redis": ('https://redis.readthedocs.io/en/stable/', None),
     "redis": ('https://redis.readthedocs.io/en/stable/', None),

+ 2 - 2
docs/dev/engines/engine_overview.rst

@@ -14,7 +14,7 @@ Engine Overview
 .. sidebar:: Further reading ..
 .. sidebar:: Further reading ..
 
 
    - :ref:`configured engines`
    - :ref:`configured engines`
-   - :ref:`settings engine`
+   - :ref:`settings engines`
 
 
 SearXNG is a metasearch-engine_, so it uses different search engines to provide
 SearXNG is a metasearch-engine_, so it uses different search engines to provide
 better results.
 better results.
@@ -63,7 +63,7 @@ Engine File
 Engine ``settings.yml``
 Engine ``settings.yml``
 -----------------------
 -----------------------
 
 
-For a more  detailed description, see :ref:`settings engine` in the :ref:`settings.yml`.
+For a more  detailed description, see :ref:`settings engines` in the :ref:`settings.yml`.
 
 
 .. table:: Common options in the engine setup (``settings.yml``)
 .. table:: Common options in the engine setup (``settings.yml``)
    :width: 100%
    :width: 100%

+ 1 - 1
docs/user/configured_engines.rst

@@ -8,7 +8,7 @@ Configured Engines
 
 
    - :ref:`settings categories_as_tabs`
    - :ref:`settings categories_as_tabs`
    - :ref:`engines-dev`
    - :ref:`engines-dev`
-   - :ref:`settings engine`
+   - :ref:`settings engines`
    - :ref:`general engine configuration`
    - :ref:`general engine configuration`
 
 
 .. jinja:: searx
 .. jinja:: searx

+ 1 - 1
searx/engines/gitea.py

@@ -30,7 +30,7 @@ Optional settings are:
     shortcut: forgejo
     shortcut: forgejo
 
 
 If you would like to use additional instances, just configure new engines in the
 If you would like to use additional instances, just configure new engines in the
-:ref:`settings <settings engine>` and set the ``base_url``.
+:ref:`settings <settings engines>` and set the ``base_url``.
 
 
 
 
 Implementation
 Implementation

+ 2 - 2
searx/engines/json_engine.py

@@ -54,7 +54,7 @@ Example
 =======
 =======
 
 
 Here is a simple example of a JSON engine configure in the :ref:`settings
 Here is a simple example of a JSON engine configure in the :ref:`settings
-engine` section, further read :ref:`engines-dev`.
+engines` section, further read :ref:`engines-dev`.
 
 
 .. code:: yaml
 .. code:: yaml
 
 
@@ -384,7 +384,7 @@ def extract_response_info(result):
 
 
 
 
 def response(resp):
 def response(resp):
-    '''Scrap *results* from the response (see :ref:`engine results`).'''
+    '''Scrap *results* from the response (see :ref:`result types`).'''
     results = []
     results = []
 
 
     if no_result_for_http_status and resp.status_code in no_result_for_http_status:
     if no_result_for_http_status and resp.status_code in no_result_for_http_status:

+ 1 - 1
searx/engines/lemmy.py

@@ -16,7 +16,7 @@ The engine has the following additional settings:
 - :py:obj:`lemmy_type`
 - :py:obj:`lemmy_type`
 
 
 This implementation is used by different lemmy engines in the :ref:`settings.yml
 This implementation is used by different lemmy engines in the :ref:`settings.yml
-<settings engine>`:
+<settings engines>`:
 
 
 .. code:: yaml
 .. code:: yaml
 
 

+ 1 - 1
searx/engines/qwant.py

@@ -17,7 +17,7 @@ The engine has the following additional settings:
 - :py:obj:`qwant_categ`
 - :py:obj:`qwant_categ`
 
 
 This implementation is used by different qwant engines in the :ref:`settings.yml
 This implementation is used by different qwant engines in the :ref:`settings.yml
-<settings engine>`:
+<settings engines>`:
 
 
 .. code:: yaml
 .. code:: yaml
 
 

+ 1 - 1
searx/engines/seekr.py

@@ -13,7 +13,7 @@ The engine has the following additional settings:
 - :py:obj:`api_key`
 - :py:obj:`api_key`
 
 
 This implementation is used by seekr engines in the :ref:`settings.yml
 This implementation is used by seekr engines in the :ref:`settings.yml
-<settings engine>`:
+<settings engines>`:
 
 
 .. code:: yaml
 .. code:: yaml
 
 

+ 1 - 1
searx/engines/xpath.py

@@ -52,7 +52,7 @@ Example
 =======
 =======
 
 
 Here is a simple example of a XPath engine configured in the :ref:`settings
 Here is a simple example of a XPath engine configured in the :ref:`settings
-engine` section, further read :ref:`engines-dev`.
+engines` section, further read :ref:`engines-dev`.
 
 
 .. code:: yaml
 .. code:: yaml
 
 

+ 1 - 1
searx/utils.py

@@ -473,7 +473,7 @@ def ecma_unescape(string: str) -> str:
 def remove_pua_from_str(string):
 def remove_pua_from_str(string):
     """Removes unicode's "PRIVATE USE CHARACTER"s (PUA_) from a string.
     """Removes unicode's "PRIVATE USE CHARACTER"s (PUA_) from a string.
 
 
-    _PUA: https://en.wikipedia.org/wiki/Private_Use_Areas
+    .. _PUA: https://en.wikipedia.org/wiki/Private_Use_Areas
     """
     """
     pua_ranges = ((0xE000, 0xF8FF), (0xF0000, 0xFFFFD), (0x100000, 0x10FFFD))
     pua_ranges = ((0xE000, 0xF8FF), (0xF0000, 0xFFFFD), (0x100000, 0x10FFFD))
     s = []
     s = []