Generalize search.xml (#8250)
This commit is contained in:
parent
046e26e721
commit
1c4c88f295
5 changed files with 13 additions and 10 deletions
|
|
@ -7,3 +7,4 @@
|
|||
// = link administrate/application.css
|
||||
// = link administrate/application.js
|
||||
// = link katex.css
|
||||
// = link search.xml
|
||||
|
|
|
|||
9
app/assets/xml/search.xml.erb
Normal file
9
app/assets/xml/search.xml.erb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<% helper = Module.new { extend ApplicationHelper } %>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName><%= helper.community_name %> Search</ShortName>
|
||||
<Description>Find posts from the <%= helper.community_qualified_name %>.</Description>
|
||||
<Contact><%= SiteConfig.email_addresses[:default] %></Contact>
|
||||
<Url type="text/html"
|
||||
template="<%= URL.url("search") %>?q={searchTerms}"/>
|
||||
</OpenSearchDescription>
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
<meta property="fb:pages" content="568966383279687" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link rel="search" href="<%= app_url("search.xml") %>" type="application/opensearchdescription+xml" title="<%= community_qualified_name %>" />
|
||||
<link rel="search" href="<%= asset_path("search.xml") %>" type="application/opensearchdescription+xml" title="<%= community_qualified_name %>" />
|
||||
<% end %>
|
||||
</head>
|
||||
<% unless internal_navigation? %>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ Rails.application.config.assets.version = "1.1"
|
|||
# Add Yarn node_modules folder to the asset load path
|
||||
Rails.application.config.assets.paths << Rails.root.join("node_modules")
|
||||
|
||||
Rails.application.config.assets.paths << Rails.root.join("app/assets/xml")
|
||||
|
||||
# Precompile additional assets.
|
||||
# application.js, application.css, and all non-JS/CSS in the app/assets
|
||||
# folder are already added.
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName>DEV Search</ShortName>
|
||||
<Description>Find posts from the DEV community.</Description>
|
||||
<Tags>software development</Tags>
|
||||
<Contact>yo@dev.to</Contact>
|
||||
<Url type="text/html"
|
||||
template="https://dev.to/search?q={searchTerms}"/>
|
||||
</OpenSearchDescription>
|
||||
Loading…
Add table
Reference in a new issue