SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[fix] brands: add variables from build env to jinja templating
Markus Heiser04c687403e21
diff --git a/Makefile b/Makefileindex 5a47129e4..3b2d499e8 100644--- a/Makefile+++ b/Makefile@@ -71,15 +71,22 @@ $(GH_PAGES)::# update project files# ---------------------PHONY += project engines-languages+PHONY += project engines-languages searx.brand-project: searx/data/engines_languages.json+project: searx/data/engines_languages.json searx.brand-searx/data/engines_languages.json: pyenvinstall+engines-languages: pyenvinstall$(PY_ENV_ACT); python utils/fetch_languages.pymv engines_languages.json searx/data/engines_languages.jsonmv languages.py searx/languages.py+searx.brand:+ $(Q)echo "build searx/brand.py"+ $(Q)echo "GIT_URL = '$(GIT_URL)'" > searx/brand.py+ $(Q)echo "SEARX_URL = '$(SEARX_URL)'" >> searx/brand.py+ $(Q)echo "DOCS_URL = '$(DOCS_URL)'" >> searx/brand.py+ $(Q)echo "PUBLIC_INSTANCES = 'https://searx.space'" >> searx/brand.py+# test# ----diff --git a/searx/templates/__common__/about.html b/searx/templates/__common__/about.htmlindex ff86ddd28..d8e1335d9 100644--- a/searx/templates/__common__/about.html+++ b/searx/templates/__common__/about.html@@ -7,7 +7,7 @@<ul><li>searx may not offer you as personalised results as Google, but it doesn't generate a profile about you</li><li>searx doesn't care about what you search for, never shares anything with a third party, and it can't be used to compromise you</li>- <li>searx is free software, the code is 100% open and you can help to make it better. See more on <a href="https://github.com/asciimoo/searx">github</a></li>+ <li>searx is free software, the code is 100% open and you can help to make it better. See more on <a href="{{ brand.GIT_URL }}">github</a></li></ul><p>If you do care about privacy, want to be a conscious user, or otherwise believein digital freedom, make searx your default search engine or run it on your own server</p>@@ -22,14 +22,14 @@ Searx can be added to your browser's search bar; moreover, it can be set as the<h2>How can I make it my own?</h2>-<p>Searx appreciates your concern regarding logs, so take the <a href="https://github.com/asciimoo/searx">code</a> and run it yourself! <br />Add your Searx to this <a href="https://searx.space/">list</a> to help other people reclaim their privacy and make the Internet freer!+<p>Searx appreciates your concern regarding logs, so take the <a href="{{ brand.GIT_URL }}">code</a> and run it yourself! <br />Add your Searx to this <a href="{{ brand.SEARX_URL }}">list</a> to help other people reclaim their privacy and make the Internet freer!<br />The more decentralized the Internet is, the more freedom we have!</p><h2>More about searx</h2><ul>- <li><a href="https://github.com/asciimoo/searx">github</a></li>+ <li><a href="{{ brand.GIT_URL }}">github</a></li><li><a href="https://www.ohloh.net/p/searx/">ohloh</a></li><li><a href="https://twitter.com/Searx_engine">twitter</a></li><li>IRC: #searx @ freenode (<a href="https://kiwiirc.com/client/irc.freenode.com/searx">webclient</a>)</li>@@ -48,13 +48,13 @@ Searx can be added to your browser's search bar; moreover, it can be set as the<h3>New engines?</h3><ul>- <li>Edit your <a href="https://raw.github.com/asciimoo/searx/master/searx/settings.yml">settings.yml</a></li>- <li>Create your custom engine module, check the <a href="https://github.com/asciimoo/searx/blob/master/examples/basic_engine.py">example engine</a></li>+ <li>Edit your <a href="{{ brand.GIT_URL }}/blob/master/searx/settings.yml">settings.yml</a></li>+ <li>Create your custom engine module, check the <a href="{{ brand.GIT_URL }}/blob/master/examples/basic_engine.py">example engine</a></li></ul><p>Don't forget to restart searx after config edit!</p><h3>Installation/WSGI support?</h3>-<p>See the <a href="https://github.com/asciimoo/searx/wiki/Installation">installation and setup</a> wiki page</p>+<p>See the <a href="{{ brand.DOCS_URL }}/admin/installation.html#uwsgi">installation and uwsgi setup</a></p><h3>How to debug engines?</h3><p><a href="{{ url_for('stats') }}">Stats page</a> contains some useful data about the engines used.</p>diff --git a/searx/templates/courgette/github_ribbon.html b/searx/templates/courgette/github_ribbon.htmlindex 67c6e678f..f6eaa123c 100644--- a/searx/templates/courgette/github_ribbon.html+++ b/searx/templates/courgette/github_ribbon.html@@ -1,3 +1,3 @@-<a href="https://github.com/asciimoo/searx" class="github">+<a href="{{ brand.GIT_URL }}" class="github"><img style="position: absolute; top: 0; right: 0; border: 0;" src="{{ url_for('static', filename='img/github_ribbon.png') }}" alt="Fork me on GitHub" class="github"/>-</a>\ No newline at end of file+</a>diff --git a/searx/templates/legacy/github_ribbon.html b/searx/templates/legacy/github_ribbon.htmlindex bdd9cf180..f6eaa123c 100644--- a/searx/templates/legacy/github_ribbon.html+++ b/searx/templates/legacy/github_ribbon.html@@ -1,3 +1,3 @@-<a href="https://github.com/asciimoo/searx" class="github">+<a href="{{ brand.GIT_URL }}" class="github"><img style="position: absolute; top: 0; right: 0; border: 0;" src="{{ url_for('static', filename='img/github_ribbon.png') }}" alt="Fork me on GitHub" class="github"/></a>diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.htmlindex 9465ca58a..4fe335798 100644--- a/searx/templates/oscar/base.html+++ b/searx/templates/oscar/base.html@@ -85,10 +85,10 @@{% endblock %}<p class="text-muted"><small>- {{ _('Powered by') }} <a href="https://asciimoo.github.io/searx/">searx</a> - {{ searx_version }} - {{ _('a privacy-respecting, hackable metasearch engine') }}<br/>- <a href="https://github.com/asciimoo/searx">{{ _('Source code') }}</a> |- <a href="https://github.com/asciimoo/searx/issues">{{ _('Issue tracker') }}</a> |- <a href="https://searx.space/">{{ _('Public instances') }}</a>+ {{ _('Powered by') }} <a href="{{ brand.DOCS_URL }}">searx</a> - {{ searx_version }} - {{ _('a privacy-respecting, hackable metasearch engine') }}<br/>+ <a href="{{ brand.GIT_URL }}">{{ _('Source code') }}</a> |+ <a href="{{ brand.GIT_URL }}/issues">{{ _('Issue tracker') }}</a> |+ <a href="{{ brand.PUBLIC_INSTANCES }}">{{ _('Public instances') }}</a></small></p></div>diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.htmlindex bba02dbf8..b5b184071 100644--- a/searx/templates/simple/base.html+++ b/searx/templates/simple/base.html@@ -51,9 +51,9 @@<footer><p>{{ _('Powered by') }} <a href="{{ url_for('about') }}">searx</a> - {{ searx_version }} - {{ _('a privacy-respecting, hackable metasearch engine') }}<br/>- <a href="https://github.com/asciimoo/searx">{{ _('Source code') }}</a> |- <a href="https://github.com/asciimoo/searx/issues">{{ _('Issue tracker') }}</a> |- <a href="https://searx.space/">{{ _('Public instances') }}</a>+ <a href="{{ brand.GIT_URL }}">{{ _('Source code') }}</a> |+ <a href="{{ brand.GIT_URL }}/issues">{{ _('Issue tracker') }}</a> |+ <a href="{{ brand.PUBLIC_INSTANCES }}">{{ _('Public instances') }}</a></p></footer><!--[if gte IE 9]>-->diff --git a/searx/webapp.py b/searx/webapp.pyold mode 100644new mode 100755index b3928921e..c6b52d6ab--- a/searx/webapp.py+++ b/searx/webapp.py@@ -57,6 +57,7 @@ from babel.support import Translationsimport flask_babelfrom flask_babel import Babel, gettext, format_date, format_decimalfrom flask.json import jsonify+from searx import brandfrom searx import settings, searx_dir, searx_debugfrom searx.exceptions import SearxParameterExceptionfrom searx.engines import (@@ -427,6 +428,8 @@ def render(template_name, override_theme=None, **kwargs):kwargs['preferences'] = request.preferences+ kwargs['brand'] = brand+kwargs['scripts'] = set()for plugin in request.user_plugins:for script in plugin.js_dependencies: