From edbe4d6a207a112ed4080e760577af1c68a9f96e Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sun, 23 Jan 2022 13:00:51 +0100 Subject: [PATCH] [enh] introduce config/ directory This commit introduces a config/ directory containing: * settings.yml (a symlink to searx/settings.yml) * brand.env (a symlink to utils/brand.env) * about.md (a new file replacing the previous searx/templates/__common__/aboutextend.html) The intention is that it's easier for admins to find the files they may want to configure. Closes #809. --- config/about.md | 4 ++++ config/brand.env | 1 + config/settings.yml | 1 + searx/templates/oscar/about.html | 1 - searx/templates/simple/about.html | 1 - searx/user_help.py | 4 ++++ 6 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 config/about.md create mode 120000 config/brand.env create mode 120000 config/settings.yml diff --git a/config/about.md b/config/about.md new file mode 100644 index 000000000..399dbb3b7 --- /dev/null +++ b/config/about.md @@ -0,0 +1,4 @@ + diff --git a/config/brand.env b/config/brand.env new file mode 120000 index 000000000..d6fc96584 --- /dev/null +++ b/config/brand.env @@ -0,0 +1 @@ +../utils/brand.env \ No newline at end of file diff --git a/config/settings.yml b/config/settings.yml new file mode 120000 index 000000000..ac96597c5 --- /dev/null +++ b/config/settings.yml @@ -0,0 +1 @@ +../searx/settings.yml \ No newline at end of file diff --git a/searx/templates/oscar/about.html b/searx/templates/oscar/about.html index a644761b6..ed9b525bc 100644 --- a/searx/templates/oscar/about.html +++ b/searx/templates/oscar/about.html @@ -2,5 +2,4 @@ {% block title %}{{ _('about') }} - {% endblock %} {% block content %} {{ help.about | safe }} -{% include "__common__/aboutextend.html" ignore missing %} {% endblock %} diff --git a/searx/templates/simple/about.html b/searx/templates/simple/about.html index 9f6a10ced..a59699367 100644 --- a/searx/templates/simple/about.html +++ b/searx/templates/simple/about.html @@ -1,5 +1,4 @@ {% extends 'simple/base.html' %} {% block content %} {{ help.about | safe }} -{% include "__common__/aboutextend.html" ignore missing %} {% endblock %} diff --git a/searx/user_help.py b/searx/user_help.py index bf7336777..5b8de8aea 100644 --- a/searx/user_help.py +++ b/searx/user_help.py @@ -44,5 +44,9 @@ def render(app: flask.Flask): continue markdown = pkg_resources.resource_string(__name__, 'help/' + filename).decode() + + if rootname == 'about': + markdown += pkg_resources.resource_string(__name__, '../config/about.md').decode() + markdown = define_link_targets + markdown HELP[rootname] = mistletoe.markdown(markdown)