diff options
author | Martin Fischer <martin@push-f.com> | 2022-01-15 06:09:37 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2022-01-23 08:01:55 +0100 |
commit | 05149db4c1e495eecaf74d267e91f61dee7ee40d (patch) | |
tree | 6972e001eb21f5272ad9c49476a253f60b886c8c /searx/webapp.py | |
parent | 382f4f8fb081699fc3a3d8d7b1ee7546156506fa (diff) | |
download | searxng-05149db4c1e495eecaf74d267e91f61dee7ee40d.tar.gz searxng-05149db4c1e495eecaf74d267e91f61dee7ee40d.zip |
[help] render user documentation once on startup
Currently we have two kinds of user documentation:
* the about page[1] which is written in HTML and part of the web
application and can therefore link instance-specific pages
(like e.g. the preferences) via Jinja variables
* the Sphinx documentation[2] which is written in reStructuredText
and cannot link instance-specific pages since it doesn't know
which instance the user is using
The plan is to integrate the user documentation currently in Sphinx
into the application, so that it can also link instance specific pages.
We also want to enable the user documentation to be translated.
This commit implements the first step in this endeavor (see #722).
[1]: searx/templates/__common__/about.html
[2]: docs/user/ (currently served at https://docs.searxng.org/user/)
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-x | searx/webapp.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index f509fea24..099a42996 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -55,6 +55,7 @@ from searx import ( get_setting, settings, searx_debug, + user_help, ) from searx.data import ENGINE_DESCRIPTIONS from searx.results import Timing, UnresponsiveEngine @@ -867,7 +868,7 @@ def __get_translated_errors(unresponsive_engines: Iterable[UnresponsiveEngine]): @app.route('/about', methods=['GET']) def about(): """Render about page""" - return render('about.html') + return render('about.html', help=user_help.HELP) @app.route('/autocompleter', methods=['GET', 'POST']) @@ -1359,6 +1360,7 @@ werkzeug_reloader = flask_run_development or (searx_debug and __name__ == "__mai if not werkzeug_reloader or (werkzeug_reloader and os.environ.get("WERKZEUG_RUN_MAIN") == "true"): plugin_initialize(app) search_initialize(enable_checker=True, check_network=True, enable_metrics=settings['general']['enable_metrics']) + user_help.render(app) def run(): |