mirror of
				https://github.com/searxng/searxng.git
				synced 2025-10-31 10:37:06 -04:00 
			
		
		
		
	[fix] various issues in the documentation
Closes: https://github.com/searxng/searxng/issues/4370 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
		
							parent
							
								
									28d1240fce
								
							
						
					
					
						commit
						2e0abc9310
					
				| @ -13,7 +13,7 @@ Settings | ||||
|    :maxdepth: 2 | ||||
| 
 | ||||
|    settings | ||||
|    settings_engine | ||||
|    settings_engines | ||||
|    settings_brand | ||||
|    settings_general | ||||
|    settings_search | ||||
|  | ||||
| @ -1,14 +1,30 @@ | ||||
| .. _settings engine: | ||||
| .. _settings engines: | ||||
| 
 | ||||
| =========== | ||||
| ``engine:`` | ||||
| =========== | ||||
| ============ | ||||
| ``engines:`` | ||||
| ============ | ||||
| 
 | ||||
| .. sidebar:: Further reading .. | ||||
| 
 | ||||
|    - :ref:`configured engines` | ||||
|    - :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 | ||||
| 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 | ||||
| 
 | ||||
|    - name: example engine | ||||
|    - name: example | ||||
|      engine: example | ||||
|      shortcut: demo | ||||
|      base_url: 'https://{language}.example.com/' | ||||
| @ -43,7 +43,7 @@ Communication with search engines. | ||||
|   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 | ||||
|   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`` : | ||||
|   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 (``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` | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -143,10 +143,10 @@ suppress_warnings = ['myst.domains'] | ||||
| intersphinx_mapping = { | ||||
|     "python": ("https://docs.python.org/3/", 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), | ||||
|     # "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), | ||||
|     "sphinx" : ("https://www.sphinx-doc.org/en/master/", None), | ||||
|     "redis": ('https://redis.readthedocs.io/en/stable/', None), | ||||
|  | ||||
| @ -14,7 +14,7 @@ Engine Overview | ||||
| .. sidebar:: Further reading .. | ||||
| 
 | ||||
|    - :ref:`configured engines` | ||||
|    - :ref:`settings engine` | ||||
|    - :ref:`settings engines` | ||||
| 
 | ||||
| SearXNG is a metasearch-engine_, so it uses different search engines to provide | ||||
| better results. | ||||
| @ -63,7 +63,7 @@ Engine File | ||||
| 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``) | ||||
|    :width: 100% | ||||
|  | ||||
| @ -8,7 +8,7 @@ Configured Engines | ||||
| 
 | ||||
|    - :ref:`settings categories_as_tabs` | ||||
|    - :ref:`engines-dev` | ||||
|    - :ref:`settings engine` | ||||
|    - :ref:`settings engines` | ||||
|    - :ref:`general engine configuration` | ||||
| 
 | ||||
| .. jinja:: searx | ||||
|  | ||||
| @ -30,7 +30,7 @@ Optional settings are: | ||||
|     shortcut: forgejo | ||||
| 
 | ||||
| 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 | ||||
|  | ||||
| @ -54,7 +54,7 @@ Example | ||||
| ======= | ||||
| 
 | ||||
| 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 | ||||
| 
 | ||||
| @ -384,7 +384,7 @@ def extract_response_info(result): | ||||
| 
 | ||||
| 
 | ||||
| def response(resp): | ||||
|     '''Scrap *results* from the response (see :ref:`engine results`).''' | ||||
|     '''Scrap *results* from the response (see :ref:`result types`).''' | ||||
|     results = [] | ||||
| 
 | ||||
|     if no_result_for_http_status and resp.status_code in no_result_for_http_status: | ||||
|  | ||||
| @ -16,7 +16,7 @@ The engine has the following additional settings: | ||||
| - :py:obj:`lemmy_type` | ||||
| 
 | ||||
| This implementation is used by different lemmy engines in the :ref:`settings.yml | ||||
| <settings engine>`: | ||||
| <settings engines>`: | ||||
| 
 | ||||
| .. code:: yaml | ||||
| 
 | ||||
|  | ||||
| @ -17,7 +17,7 @@ The engine has the following additional settings: | ||||
| - :py:obj:`qwant_categ` | ||||
| 
 | ||||
| This implementation is used by different qwant engines in the :ref:`settings.yml | ||||
| <settings engine>`: | ||||
| <settings engines>`: | ||||
| 
 | ||||
| .. code:: yaml | ||||
| 
 | ||||
|  | ||||
| @ -13,7 +13,7 @@ The engine has the following additional settings: | ||||
| - :py:obj:`api_key` | ||||
| 
 | ||||
| This implementation is used by seekr engines in the :ref:`settings.yml | ||||
| <settings engine>`: | ||||
| <settings engines>`: | ||||
| 
 | ||||
| .. code:: yaml | ||||
| 
 | ||||
|  | ||||
| @ -52,7 +52,7 @@ Example | ||||
| ======= | ||||
| 
 | ||||
| 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 | ||||
| 
 | ||||
|  | ||||
| @ -473,7 +473,7 @@ def ecma_unescape(string: str) -> str: | ||||
| def remove_pua_from_str(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)) | ||||
|     s = [] | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user