summaryrefslogtreecommitdiff
path: root/searx/user_help.py
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2022-01-15 09:01:38 +0100
committerMartin Fischer <martin@push-f.com>2022-01-23 08:01:55 +0100
commit284ac8bfd8a3d1f762c98a0195b98a45cdd089d3 (patch)
treef0d7d93a1921b374dd1c51f4909eff327c2e2020 /searx/user_help.py
parent05149db4c1e495eecaf74d267e91f61dee7ee40d (diff)
[help] convert about.html to Markdown
To facilitate translation the new user documentation shall be written in Markdown (which is more human-friendly than HTML and reStructuredText).
Diffstat (limited to 'searx/user_help.py')
-rw-r--r--searx/user_help.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/user_help.py b/searx/user_help.py
index 2822d3a0d..1d3cbef37 100644
--- a/searx/user_help.py
+++ b/searx/user_help.py
@@ -3,6 +3,7 @@ import os.path
import pkg_resources
import flask
+import mistletoe
from . import get_setting
from .version import GIT_URL
@@ -20,7 +21,7 @@ def render(app: flask.Flask):
"""
for filename in pkg_resources.resource_listdir(__name__, 'help'):
rootname, ext = os.path.splitext(filename)
- if ext != '.html':
+ if ext != '.md':
continue
text = pkg_resources.resource_string(__name__, 'help/' + filename).decode()
@@ -35,4 +36,4 @@ def render(app: flask.Flask):
interpolated = flask.render_template_string(text, get_setting=get_setting, searx_git_url=GIT_URL)
- HELP[rootname] = interpolated
+ HELP[rootname] = mistletoe.markdown(interpolated)