summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/_themes/searxng/static/searxng.css3
-rw-r--r--docs/admin/arch_public.dot8
-rw-r--r--docs/admin/engines/configured_engines.rst14
-rw-r--r--docs/admin/engines/settings.rst27
-rw-r--r--docs/admin/filtron.rst2
-rw-r--r--docs/conf.py17
-rw-r--r--docs/dev/makefile.rst19
-rw-r--r--docs/dev/quickstart.rst5
-rw-r--r--docs/dev/reST.rst2
-rw-r--r--docs/dev/searxng_extra/index.rst9
-rw-r--r--docs/dev/searxng_extra/update.rst88
-rw-r--r--docs/user/search_syntax.rst3
12 files changed, 167 insertions, 30 deletions
diff --git a/docs/_themes/searxng/static/searxng.css b/docs/_themes/searxng/static/searxng.css
index e6f93412d..64f6d4700 100644
--- a/docs/_themes/searxng/static/searxng.css
+++ b/docs/_themes/searxng/static/searxng.css
@@ -33,6 +33,9 @@ p.sidebar-title, .sidebar p {
list-style-type: disclosure-closed;
}
+.sphinxsidebar .current > a {
+ font-weight: bold;
+}
/* admonitions
*/
diff --git a/docs/admin/arch_public.dot b/docs/admin/arch_public.dot
index b838685e7..c4ee5f3c1 100644
--- a/docs/admin/arch_public.dot
+++ b/docs/admin/arch_public.dot
@@ -4,11 +4,11 @@ digraph G {
edge [fontname="Sans"];
browser [label="Browser", shape=Mdiamond];
- rp [label="Reverse Proxy", href="https://searxng.github.io/searxng/utils/filtron.sh.html#public-reverse-proxy"];
- filtron [label="Filtron", href="https://searxng.github.io/searxng/utils/filtron.sh.html"];
- morty [label="Morty", href="https://searxng.github.io/searxng/utils/morty.sh.html"];
+ rp [label="Reverse Proxy", href="https://docs.searxng.org/utils/filtron.sh.html#public-reverse-proxy"];
+ filtron [label="Filtron", href="https://docs.searxng.org/utils/filtron.sh.html"];
+ morty [label="Morty", href="https://docs.searxng.org/utils/morty.sh.html"];
static [label="Static files", href="url to configure static files"];
- uwsgi [label="uwsgi", href="https://searxng.github.io/searxng/utils/searx.sh.html"]
+ uwsgi [label="uwsgi", href="https://docs.searxng.org/utils/searx.sh.html"]
searx1 [label="Searx #1"];
searx2 [label="Searx #2"];
searx3 [label="Searx #3"];
diff --git a/docs/admin/engines/configured_engines.rst b/docs/admin/engines/configured_engines.rst
index 0060d1b74..c7b6a1f52 100644
--- a/docs/admin/engines/configured_engines.rst
+++ b/docs/admin/engines/configured_engines.rst
@@ -16,11 +16,18 @@ Explanation of the :ref:`general engine configuration` shown in the table
SearXNG supports {{engines | length}} search engines (of which {{enabled_engine_count}} are enabled by default).
- {% for category, engines in engines.items() | groupby('1.categories.0') %}
+ {% for category, engines in categories_as_tabs.items() %}
{{category}} search engines
---------------------------------------
+ {% for group, engines in engines | group_engines_in_tab %}
+
+ {% if loop.length > 1 %}
+ {{group}}
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ {% endif %}
+
.. flat-table::
:header-rows: 2
:stub-columns: 1
@@ -39,9 +46,9 @@ Explanation of the :ref:`general engine configuration` shown in the table
- Safe search
- Time range
- {% for name, mod in engines | sort_engines %}
+ {% for mod in engines %}
- * - `{{name}} <{{mod.about and mod.about.website}}>`_
+ * - `{{mod.name}} <{{mod.about and mod.about.website}}>`_
- ``!{{mod.shortcut}}``
- {%- if 'searx.engines.' + mod.__name__ in documented_modules %}
:py:mod:`~searx.engines.{{mod.__name__}}`
@@ -65,3 +72,4 @@ Explanation of the :ref:`general engine configuration` shown in the table
{% endfor %}
{% endfor %}
+ {% endfor %}
diff --git a/docs/admin/engines/settings.rst b/docs/admin/engines/settings.rst
index 9f96a2b68..c96dd3329 100644
--- a/docs/admin/engines/settings.rst
+++ b/docs/admin/engines/settings.rst
@@ -46,7 +46,7 @@ Global Settings
brand:
issue_url: https://github.com/searxng/searxng/issues
- docs_url: https://searxng/searxng.github.io/searxng
+ docs_url: https://docs.searxng.org
public_instances: https://searx.space
wiki_url: https://github.com/searxng/searxng/wiki
@@ -81,6 +81,9 @@ Global Settings
``contact_url``:
Contact ``mailto:`` address or WEB form.
+``enable_metrics``:
+ Enabled by default. Record various anonymous metrics availabled at ``/stats``,
+ ``/stats/errors`` and ``/preferences``.
.. _settings global server:
@@ -249,6 +252,26 @@ Communication with search engines.
``max_redirects`` :
30 by default. Maximum redirect before it is an error.
+``categories_as_tabs:``
+-----------------------
+
+A list of the categories that are displayed as tabs in the user interface.
+Categories not listed here can still be searched with the :ref:`search-syntax`.
+
+.. code-block:: yaml
+
+ categories_as_tabs:
+ general:
+ images:
+ videos:
+ news:
+ map:
+ music:
+ it:
+ science:
+ files:
+ social media:
+
.. _settings engine:
Engine settings
@@ -309,7 +332,7 @@ engine is shown. Most of the options have a default value or even are optional.
search engine.
``shortcut`` :
- Code used to execute bang requests (in this case using ``!bi`` or ``?bi``)
+ Code used to execute bang requests (in this case using ``!bi``)
``base_url`` : optional
Part of the URL that should be stable across every request. Can be useful to
diff --git a/docs/admin/filtron.rst b/docs/admin/filtron.rst
index 9587d76cb..f08149ae9 100644
--- a/docs/admin/filtron.rst
+++ b/docs/admin/filtron.rst
@@ -23,7 +23,7 @@ it is advised to limit the number of requests processed by SearXNG.
An application firewall, filtron_ solves exactly this problem. Filtron is just
a middleware between your web server (nginx, apache, ...) and searx, we describe
-such infratructures in chapter: :ref:`architecture`.
+such infrastructures in chapter: :ref:`architecture`.
filtron & go
diff --git a/docs/conf.py b/docs/conf.py
index 628687b6a..ad7152a2b 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -3,6 +3,7 @@
import sys, os
from pallets_sphinx_themes import ProjectLink
+from flask import Flask
from searx import get_setting
from searx.version import VERSION_STRING, GIT_URL, GIT_BRANCH
@@ -39,7 +40,15 @@ exclude_patterns = ['build-templates/*.rst']
import searx.engines
import searx.plugins
+import searx.webutils
+
+# bypass a creepy check of the secret_key in searx.webapp
+searx.settings['server']['secret_key'] = ''
+from searx.webapp import application
+
searx.engines.load_engines(searx.settings['engines'])
+searx.plugins.initialize(application)
+
jinja_contexts = {
'searx': {
'engines': searx.engines.engines,
@@ -48,14 +57,12 @@ jinja_contexts = {
'node': os.getenv('NODE_MINIMUM_VERSION')
},
'enabled_engine_count': sum(not x.disabled for x in searx.engines.engines.values()),
+ 'categories': searx.engines.categories,
+ 'categories_as_tabs': {c: searx.engines.categories[c] for c in searx.settings['categories_as_tabs']},
},
}
jinja_filters = {
- 'sort_engines':
- lambda engines: sorted(
- engines,
- key=lambda engine: (engine[1].disabled, engine[1].about.get('language', ''), engine[0])
- )
+ 'group_engines_in_tab': searx.webutils.group_engines_in_tab,
}
# Let the Jinja template in configured_engines.rst access documented_modules
diff --git a/docs/dev/makefile.rst b/docs/dev/makefile.rst
index 66def0b3a..8c9058c34 100644
--- a/docs/dev/makefile.rst
+++ b/docs/dev/makefile.rst
@@ -13,7 +13,7 @@ Makefile
To install system requirements follow :ref:`buildhosts`.
-All relevant build tasks are implemented in :origin:`manage.sh` and for CI or
+All relevant build tasks are implemented in :origin:`manage` and for CI or
IDE integration a small ``Makefile`` wrapper is available. If you are not
familiar with Makefiles, we recommend to read gnu-make_ introduction.
@@ -173,14 +173,19 @@ Install latest Node.js_ LTS locally (uses nvm_)::
To get up a running a developer instance simply call ``make run``. This enables
*debug* option in :origin:`searx/settings.yml`, starts a ``./searx/webapp.py``
-instance, disables *debug* option again and opens the URL in your favorite WEB
-browser (:man:`xdg-open`)::
+instance and opens the URL in your favorite WEB browser (:man:`xdg-open`)::
$ make run
- PYENV OK
- SEARXNG_DEBUG=1 ./manage.sh pyenv.cmd python ./searx/webapp.py
- ...
- INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
+
+Changes to theme's HTML templates (jinja2) are instant. Changes to the CSS & JS
+sources of the theme need to be rebuild. You can do that by running::
+
+ $ make themes.all
+
+Alternatively to ``themes.all`` you can run *live builds* of the theme you are
+modify::
+
+ $ LIVE_THEME=simple make run
.. _make clean:
diff --git a/docs/dev/quickstart.rst b/docs/dev/quickstart.rst
index d2b666c09..db52a2d80 100644
--- a/docs/dev/quickstart.rst
+++ b/docs/dev/quickstart.rst
@@ -40,10 +40,15 @@ JavaScript:
Alternatively you can also compile selective the theme you have modified,
e.g. the *simple* theme.
+
.. code:: sh
make themes.simple
+.. tip::
+
+ To get live builds while modifying CSS & JS use: ``LIVE_THEME=simple make run``
+
If you finished your *tests* you can start to commit your changes. To separate
the modified source code from the build products first run:
diff --git a/docs/dev/reST.rst b/docs/dev/reST.rst
index 4f17b1b2f..70d08adb5 100644
--- a/docs/dev/reST.rst
+++ b/docs/dev/reST.rst
@@ -320,7 +320,7 @@ To list all anchors of the inventory (e.g. ``python``) use:
$ python -m sphinx.ext.intersphinx https://docs.python.org/3/objects.inv
...
- $ python -m sphinx.ext.intersphinx https://searxng.github.io/searxng/objects.inv
+ $ python -m sphinx.ext.intersphinx https://docs.searxng.org/objects.inv
...
Literal blocks
diff --git a/docs/dev/searxng_extra/index.rst b/docs/dev/searxng_extra/index.rst
index f38bb3154..c2b5c312b 100644
--- a/docs/dev/searxng_extra/index.rst
+++ b/docs/dev/searxng_extra/index.rst
@@ -1,14 +1,15 @@
.. _searxng_extra:
-======================================================
-Tooling box ``searxng_extra`` for developers and users
-======================================================
+=============================
+Tooling box ``searxng_extra``
+=============================
-In the folder :origin:`searxng_extra/` we maintain some tools useful for
+In the folder :origin:`searxng_extra/` we maintain some tools useful for CI and
developers.
.. toctree::
:maxdepth: 2
:caption: Contents
+ update
standalone_searx.py
diff --git a/docs/dev/searxng_extra/update.rst b/docs/dev/searxng_extra/update.rst
new file mode 100644
index 000000000..d05c81409
--- /dev/null
+++ b/docs/dev/searxng_extra/update.rst
@@ -0,0 +1,88 @@
+=========================
+``searxng_extra/update/``
+=========================
+
+:origin:`[source] <searxng_extra/update/__init__.py>`
+
+Scripts to update static data in :origin:`searx/data/`
+
+.. _update_ahmia_blacklist.py:
+
+``update_ahmia_blacklist.py``
+=============================
+
+:origin:`[source] <searxng_extra/update/update_ahmia_blacklist.py>`
+
+.. automodule:: searxng_extra.update.update_ahmia_blacklist
+ :members:
+
+
+``update_currencies.py``
+========================
+
+:origin:`[source] <searxng_extra/update/update_currencies.py>`
+
+.. automodule:: searxng_extra.update.update_currencies
+ :members:
+
+``update_engine_descriptions.py``
+=================================
+
+:origin:`[source] <searxng_extra/update/update_engine_descriptions.py>`
+
+.. automodule:: searxng_extra.update.update_engine_descriptions
+ :members:
+
+
+``update_external_bangs.py``
+============================
+
+:origin:`[source] <searxng_extra/update/update_external_bangs.py>`
+
+.. automodule:: searxng_extra.update.update_external_bangs
+ :members:
+
+
+``update_firefox_version.py``
+=============================
+
+:origin:`[source] <searxng_extra/update/update_firefox_version.py>`
+
+.. automodule:: searxng_extra.update.update_firefox_version
+ :members:
+
+
+``update_languages.py``
+=======================
+
+:origin:`[source] <searxng_extra/update/update_languages.py>`
+
+.. automodule:: searxng_extra.update.update_languages
+ :members:
+
+
+``update_osm_keys_tags.py``
+===========================
+
+:origin:`[source] <searxng_extra/update/update_osm_keys_tags.py>`
+
+.. automodule:: searxng_extra.update.update_osm_keys_tags
+ :members:
+
+
+``update_pygments.py``
+======================
+
+:origin:`[source] <searxng_extra/update/update_pygments.py>`
+
+.. automodule:: searxng_extra.update.update_pygments
+ :members:
+
+
+``update_wikidata_units.py``
+============================
+
+:origin:`[source] <searxng_extra/update/update_wikidata_units.py>`
+
+.. automodule:: searxng_extra.update.update_wikidata_units
+ :members:
diff --git a/docs/user/search_syntax.rst b/docs/user/search_syntax.rst
index 50cd8fabb..e9ed3e870 100644
--- a/docs/user/search_syntax.rst
+++ b/docs/user/search_syntax.rst
@@ -14,9 +14,6 @@ Prefix ``!``
Prefix: ``:``
to set language
-Prefix: ``?``
- to add engines and categories to the currently selected categories
-
Abbrevations of the engines and languages are also accepted. Engine/category
modifiers are chainable and inclusive (e.g. with :search:`!it !ddg !wp qwer
<?q=%21it%20%21ddg%20%21wp%20qwer>` search in IT category **and** duckduckgo