discourse/app/views/metadata/opensearch.xml.erb
Sam Saffron 1be01f8dd4 DEV: Add support for Rails 6
Minor fixes to add Rails 6 support to Discourse, we now will boot
with RAILS_MASTER=1, all specs pass

Only one tiny deprecation left

Largest change was the way ActiveModel:Errors changed interface a
bit but there is a simple backwards compat way of working it
2019-05-02 16:23:25 +10:00

17 lines
926 B
Plaintext

<?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>
<% site_favicon_url = SiteSetting.site_favicon_url %>
<% absolute_site_favicon_url = ::UrlHelper.absolute(site_favicon_url) %>
<% if site_favicon_url =~ /\.ico$/ -%>
<Image height="16" width="16" type="image/vnd.microsoft.icon"><%= absolute_site_favicon_url %></Image>
<%- else -%>
<Image type="image/png"><%= absolute_site_favicon_url %></Image>
<%- end %>
<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>