Skip to content

Commit 7633f71

Browse files
committed
Add OpenSearch support
1 parent e3fe8ff commit 7633f71

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

_includes/search.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ <h3>
55
</div>
66

77
<div class="widget search">
8-
<form method="get" class="search-form" action="https://www.google.com/search">
8+
<form method="get" id="search-form" class="search-form" action="https://www.google.com/search">
99
<div>
1010
<input class="search-text" type="text" name="q" placeholder="Search..." id="searchfield">
1111
<input type="hidden" name="sitesearch" value="elixir-lang.org">

_includes/top.html

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<meta name="viewport" content="width=device-width,initial-scale=1" />
1515
<link rel="stylesheet" id="font-bitter-css" href="http://fonts.googleapis.com/css?family=Bitter:400,700" type="text/css" media="screen" />
1616
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
17+
<link rel="search" type="application/opensearchdescription+xml" title="elixir-lang.org" href="/opensearch.xml" />
1718
<script>
1819
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
1920
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

opensearch.xml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
3+
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
4+
<Description>Search Elixir website</Description>
5+
<SearchForm>http://elixir-lang.org/</SearchForm>
6+
<moz:SearchForm>http://elixir-lang.org/</moz:SearchForm>
7+
<InputEncoding>UTF-8</InputEncoding>
8+
<Language>en</Language>
9+
10+
<ShortName>elixir-lang.org</ShortName>
11+
<Url rel="self" type="application/opensearchdescription+xml" href="http://elixir-lang.org/opensearch.xml" />
12+
<Url method="get" type="text/html"
13+
template="https://www.google.com/search?q={searchTerms}&amp;sitesearch=elixir-lang.org" />
14+
<Image width="16" height="16">http://elixir-lang.org/favicon.ico</Image>
15+
</OpenSearchDescription>

0 commit comments

Comments
 (0)