mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 18:42:33 +02:00
[mod] add a __common__ template that can't be selected but that provides a common place for shared templates.
What has been moved into this template : * opensearch*.xml is always the same whatever the themes. * the text inside */about.html
This commit is contained in:
parent
57149661e4
commit
7fdfeca3a4
14 changed files with 75 additions and 353 deletions
62
searx/templates/__common__/about.html
Normal file
62
searx/templates/__common__/about.html
Normal file
|
@ -0,0 +1,62 @@
|
|||
<div{% if rtl %} dir="ltr"{% endif %}>
|
||||
<h1>About <a href="{{ url_for('index') }}">searx</a></h1>
|
||||
|
||||
<p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>, aggregating the results of other <a href="{{ url_for('preferences') }}">search engines</a> while not storing information about its users.
|
||||
</p>
|
||||
<h2>Why use searx?</h2>
|
||||
<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>
|
||||
</ul>
|
||||
<p>If you do care about privacy, want to be a conscious user, or otherwise believe
|
||||
in digital freedom, make searx your default search engine or run it on your own server</p>
|
||||
|
||||
<h2>Technical details - How does it work?</h2>
|
||||
|
||||
<p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>,
|
||||
inspired by the <a href="https://beniz.github.io/seeks/">seeks project</a>.<br />
|
||||
It provides basic privacy by mixing your queries with searches on other platforms without storing search data. Queries are made using a POST request on every browser (except chrome*). Therefore they show up in neither our logs, nor your url history. In case of Chrome* users there is an exception, searx uses the search bar to perform GET requests.<br />
|
||||
Searx can be added to your browser's search bar; moreover, it can be set as the default search engine.
|
||||
</p>
|
||||
|
||||
<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://github.com/asciimoo/searx/wiki/Searx-instances">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="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>
|
||||
<li><a href="https://www.transifex.com/projects/p/searx/">transifex</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<hr />
|
||||
|
||||
<h2 id="faq">FAQ</h2>
|
||||
|
||||
<h3>How to add to firefox?</h3>
|
||||
<p><a href="#" onclick="window.external.AddSearchProvider(window.location.protocol + '//' + window.location.host + '{{ url_for('opensearch') }}');">Install</a> searx as a search engine on any version of Firefox! (javascript required)</p>
|
||||
|
||||
<h2 id="dev_faq">Developer FAQ</h2>
|
||||
|
||||
<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>
|
||||
</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>
|
||||
|
||||
<h3>How to debug engines?</h3>
|
||||
<p><a href="{{ url_for('stats') }}">Stats page</a> contains some useful data about the engines used.</p>
|
||||
|
||||
</div>
|
28
searx/templates/__common__/opensearch.xml
Normal file
28
searx/templates/__common__/opensearch.xml
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName>{{ instance_name }}</ShortName>
|
||||
<Description>a privacy-respecting, hackable metasearch engine</Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Image>{{ urljoin(host, url_for('static', filename='img/favicon.png')) }}</Image>
|
||||
<LongName>searx metasearch</LongName>
|
||||
{% if opensearch_method == 'get' %}
|
||||
<Url type="text/html" method="get" template="{{ host }}search?q={searchTerms}"/>
|
||||
{% if autocomplete %}
|
||||
<Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
|
||||
<Param name="format" value="x-suggestions" />
|
||||
<Param name="q" value="{searchTerms}" />
|
||||
</Url>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<Url type="text/html" method="post" template="{{ host }}">
|
||||
<Param name="q" value="{searchTerms}" />
|
||||
</Url>
|
||||
{% if autocomplete %}
|
||||
<!-- TODO, POST REQUEST doesn't work -->
|
||||
<Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
|
||||
<Param name="format" value="x-suggestions" />
|
||||
<Param name="q" value="{searchTerms}" />
|
||||
</Url>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</OpenSearchDescription>
|
23
searx/templates/__common__/opensearch_response_rss.xml
Normal file
23
searx/templates/__common__/opensearch_response_rss.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0"
|
||||
xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Searx search: {{ q|e }}</title>
|
||||
<link>{{ base_url }}?q={{ q|e }}</link>
|
||||
<description>Search results for "{{ q|e }}" - searx</description>
|
||||
<opensearch:totalResults>{{ number_of_results }}</opensearch:totalResults>
|
||||
<opensearch:startIndex>1</opensearch:startIndex>
|
||||
<opensearch:itemsPerPage>{{ number_of_results }}</opensearch:itemsPerPage>
|
||||
<atom:link rel="search" type="application/opensearchdescription+xml" href="{{ base_url }}opensearch.xml"/>
|
||||
<opensearch:Query role="request" searchTerms="{{ q|e }}" startPage="1" />
|
||||
{% for r in results %}
|
||||
<item>
|
||||
<title>{{ r.title }}</title>
|
||||
<link>{{ r.url }}</link>
|
||||
<description>{{ r.content }}</description>
|
||||
{% if r.pubdate %}<pubDate>{{ r.pubdate }}</pubDate>{% endif %}
|
||||
</item>
|
||||
{% endfor %}
|
||||
</channel>
|
||||
</rss>
|
Loading…
Add table
Add a link
Reference in a new issue