[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.
This commit is contained in:
Martin Fischer 2022-01-23 13:00:51 +01:00
parent a8d54cfcab
commit edbe4d6a20
6 changed files with 10 additions and 2 deletions

4
config/about.md Normal file
View file

@ -0,0 +1,4 @@
<!--
Below this comment you can write something about your instance if you want to.
(Whatever you write here is shown at the end of the /about page.)
-->

1
config/brand.env Symbolic link
View file

@ -0,0 +1 @@
../utils/brand.env

1
config/settings.yml Symbolic link
View file

@ -0,0 +1 @@
../searx/settings.yml

View file

@ -2,5 +2,4 @@
{% block title %}{{ _('about') }} - {% endblock %} {% block title %}{{ _('about') }} - {% endblock %}
{% block content %} {% block content %}
{{ help.about | safe }} {{ help.about | safe }}
{% include "__common__/aboutextend.html" ignore missing %}
{% endblock %} {% endblock %}

View file

@ -1,5 +1,4 @@
{% extends 'simple/base.html' %} {% extends 'simple/base.html' %}
{% block content %} {% block content %}
{{ help.about | safe }} {{ help.about | safe }}
{% include "__common__/aboutextend.html" ignore missing %}
{% endblock %} {% endblock %}

View file

@ -44,5 +44,9 @@ def render(app: flask.Flask):
continue continue
markdown = pkg_resources.resource_string(__name__, 'help/' + filename).decode() 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 markdown = define_link_targets + markdown
HELP[rootname] = mistletoe.markdown(markdown) HELP[rootname] = mistletoe.markdown(markdown)