forked from zaclys/searxng
[enh] settings option to change instance name - closes #450
This commit is contained in:
parent
ead8456a2b
commit
0fbd705259
@ -1,5 +1,6 @@
|
||||
general:
|
||||
debug : False # Debug mode, only for development
|
||||
instance_name : "searx" # displayed name
|
||||
|
||||
search:
|
||||
safe_search : 0 # Filter results. 0: None, 1: Moderate, 2: Strict
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName>searx</ShortName>
|
||||
<ShortName>{{ instance_name }}</ShortName>
|
||||
<Description>a privacy-respecting, hackable metasearch engine</Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Image>{{ host }}{{ url_for('static', filename='img/favicon.png') | replace("/", "", 1) }}</Image>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName>searx</ShortName>
|
||||
<ShortName>{{ instance_name }}</ShortName>
|
||||
<Description>a privacy-respecting, hackable metasearch engine</Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Image>{{ host }}{{ url_for('static', filename='img/favicon.png') | replace("/", "", 1) }}</Image>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<meta name="referrer" content="no-referrer">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=1.0, user-scalable=1" />
|
||||
{% block meta %}{% endblock %}
|
||||
<title>{% block title %}{% endblock %}searx</title>
|
||||
<title>{% block title %}{% endblock %}{{ instance_name }}</title>
|
||||
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/oscar.min.css') }}" type="text/css" />
|
||||
@ -31,7 +31,7 @@
|
||||
{% block head %}
|
||||
{% endblock %}
|
||||
|
||||
<link title="searx" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/>
|
||||
<link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
searx = {};
|
||||
|
@ -16,7 +16,7 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{ url_for('index') }}">searx</a>
|
||||
<a class="navbar-brand" href="{{ url_for('index') }}">{{ instance_name }}</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="navbar-header">
|
||||
@ -26,7 +26,7 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{ url_for('index') }}">searx</a>
|
||||
<a class="navbar-brand" href="{{ url_for('index') }}">{{ instance_name }}</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right"> <!-- results.html -->
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName>searx</ShortName>
|
||||
<ShortName>{{ instance_name }}</ShortName>
|
||||
<Description>a privacy-respecting, hackable metasearch engine</Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Image>{{ host }}{{ url_for('static', filename='img/favicon.png') | replace("/", "", 1) }}</Image>
|
||||
|
@ -328,6 +328,8 @@ def render(template_name, override_theme=None, **kwargs):
|
||||
|
||||
kwargs['cookies'] = request.cookies
|
||||
|
||||
kwargs['instance_name'] = settings['general']['instance_name']
|
||||
|
||||
kwargs['scripts'] = set()
|
||||
for plugin in request.user_plugins:
|
||||
for script in plugin.js_dependencies:
|
||||
|
Loading…
Reference in New Issue
Block a user