mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[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:
parent
a8d54cfcab
commit
edbe4d6a20
6 changed files with 10 additions and 2 deletions
4
config/about.md
Normal file
4
config/about.md
Normal 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
1
config/brand.env
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../utils/brand.env
|
1
config/settings.yml
Symbolic link
1
config/settings.yml
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../searx/settings.yml
|
|
@ -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 %}
|
||||||
|
|
|
@ -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 %}
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue