opensearch.xml 1.3 KB

123456789101112131415161718192021
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
  3. <ShortName>{{ instance_name }}</ShortName>
  4. <LongName>SearXNG metasearch</LongName>
  5. <Description>SearXNG is a metasearch engine that respects your privacy.</Description>
  6. <InputEncoding>UTF-8</InputEncoding>
  7. <Image type="image/png">{{ url_for('static', filename='img/favicon.png', _external=True) }}</Image>
  8. {% if opensearch_method == 'GET' %}
  9. <Url rel="results" type="text/html" method="{{ opensearch_method }}" template="{{ url_for('search', _external=True) }}?q={searchTerms}"/>
  10. {% else %}
  11. <Url rel="results" type="text/html" method="{{ opensearch_method }}" 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" method="{{ opensearch_method }}" template="{{ url_for('autocompleter', _external=True) }}?q={searchTerms}"/>
  17. {% endif %}
  18. <Url rel="self" type="application/opensearchdescription+xml" method="{{ opensearch_method }}" template="{{ url_for('opensearch', _external=True) }}" />
  19. <Query role="example" searchTerms="SearXNG" />
  20. <moz:SearchForm>{{ url_for('search', _external=True) }}</moz:SearchForm>
  21. </OpenSearchDescription>