[mod] drop usage of the searx.brand namespace (templates & /config)

In the templates and the /config (JSON) the usage of the 'brand.*' name
space is replaced by 'searx.get_setting' function.

- new_issue_url          --> get_setting('brand.new_issue_url')
- brand.GIT_URL          --> get_setting('brand.git_url')
- brand.PUBLIC_INSTANCES --> get_setting('brand.public_instances')
- brand.DOCS_URL         --> get_setting('brand.docs_url')
- brand.ISSUE_URL        --> get_setting('brand.issue_url')
- brand.CONTACT_URL      --> get_setting('general.contact_url', '')

The macro 'new_issue' from searx/templates/*/messages/no_results.html
is now imported with context::

    {% from '__common__/new_issue.html' import new_issue with context %}

To get *public instances URL* from context's 'get_setting()' function::

    get_setting('brand.public_instances','')

Macro's prototype does no longer need the 'new_issue_url' argument and has been
changed to::

    macro new_issue(engine_name, engine_reliability)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2021-07-18 15:38:52 +02:00
parent c9220de690
commit 3f638ed196
9 changed files with 32 additions and 32 deletions

View file

@ -11,7 +11,7 @@
<p>More about SearXNG ...</p>
<ul>
<li><a href="{{ brand.GIT_URL }}">github</a></li>
<li><a href="{{ get_setting('brand.git_url') }}">SearXNG sources</a></li>
<li><a href="https://www.transifex.com/projects/p/searx/">transifex</a></li>
</ul>
@ -30,7 +30,8 @@
</li>
<li>
SearXNG 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>.
it better. See more on <a href="{{ get_setting('brand.git_url')
}}">SearXNG sources</a>.
</li>
</ul>
@ -80,10 +81,11 @@
<p>
SearXNG appreciates your concern regarding logs, so take the code from
the <a href="{{ brand.GIT_URL }}">SearXNG project</a> and run it yourself!
the <a href="{{ get_setting('brand.git_url') }}">SearXNG project</a> and
run it yourself!
</p>
<p>
Add your instance to this <a href="{{ brand.PUBLIC_INSTANCES }}"> list of
Add your instance to this <a href="{{ get_setting('brand.public_instances') }}"> list of
public instances</a> to help other people reclaim their privacy and make the
Internet freer! The more decentralized the Internet is, the more freedom we
have!
@ -92,8 +94,8 @@
<h2>Where are the docs & code of this instance?</h2>
<p>
See the <a href="{{ brand.DOCS_URL }}">{{ brand.DOCS_URL }}</a>
and <a href="{{ brand.GIT_URL }}">{{ brand.GIT_URL }}</a>
See the <a href="{{ get_setting('brand.docs_url') }}">SearXNG docs</a>
and <a href="{{ get_setting('brand.git_url') }}">SearXNG sources</a>
</p>
</div>