discourse/app/views/metadata/opensearch.xml.erb

17 lines
926 B
Plaintext
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName><%= SiteSetting.title %> Search</ShortName>
<Description>Search for posts on <%= SiteSetting.title %></Description>
<Tags>discourse forum</Tags>
2018-11-14 15:03:02 +08:00
<% site_favicon_url = SiteSetting.site_favicon_url %>
<% absolute_site_favicon_url = ::UrlHelper.absolute(site_favicon_url) %>
2018-11-14 15:03:02 +08:00
<% if site_favicon_url =~ /\.ico$/ -%>
<Image height="16" width="16" type="image/vnd.microsoft.icon"><%= absolute_site_favicon_url %></Image>
<%- else -%>
2018-11-14 15:03:02 +08:00
<Image type="image/png"><%= absolute_site_favicon_url %></Image>
<%- end %>
2016-09-20 10:25:54 +08:00
<Url type="application/opensearchdescription+xml" rel="self" template="<%= Discourse.base_url %>/opensearch.xml"/>
<Url type="text/html" template="<%= Discourse.base_url %>/search?q={searchTerms}"/>
<Query role="example" searchTerms="search term"/>
</OpenSearchDescription>