opensearch.xml 1.0 KB

1234567891011121314151617181920212223
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
  3. <ShortName>{{ instance_name }}</ShortName>
  4. <Description>a privacy-respecting, hackable metasearch engine</Description>
  5. <InputEncoding>UTF-8</InputEncoding>
  6. <Image>{{ url_for('static', filename='img/favicon.png', _external=True) }}</Image>
  7. <LongName>searx metasearch</LongName>
  8. {% if opensearch_method == 'get' %}
  9. <Url rel="results" type="text/html" method="get" template="{{ url_for('search', _external=True) }}?q={searchTerms}"/>
  10. {% else %}
  11. <Url rel="results" type="text/html" method="post" template="{{ url_for('search', _external=True) }}">
  12. <Param name="q" value="{searchTerms}" />
  13. </Url>
  14. {% endif %}
  15. {% if autocomplete %}
  16. <Url rel="suggestions" type="application/x-suggestions+json" template="{{ url_for('autocompleter', _external=True) }}?q={searchTerms}"/>
  17. {% endif %}
  18. <Url type="application/opensearchdescription+xml"
  19. rel="self"
  20. template="{{ opensearch_url }}" />
  21. </OpenSearchDescription>