Browse Source

Open search description files

osd
Tristan Webb 7 years ago
parent
commit
8198c06b01
  1. 15
      static/opensearchhoogle.xml
  2. 15
      static/opensearchpackage.xml
  3. 3
      templates/default-layout-wrapper.hamlet

15
static/opensearchhoogle.xml

@ -0,0 +1,15 @@
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Stackage hoogle</ShortName>
<LongName>Hoogle Stackage.org</LongName>
<Description>Search modules on Stackage.org using hoogle</Description>
<Developer>FP Complete CORP.</Developer>
<Attribution>Copyright FP Complete CORP.</Attribution>
<AdultContent>false</AdultContent>
<Language>en-us</Language>
<InputEncoding>UTF-8</InputEncoding>
<OutputEncoding>UTF-8</OutputEncoding>
<Image width="222" height="222" type="image/x-icon">http://www.stackage.org/static/img/stackage.png</Image>
<Url type="text/html" method="GET" template="http://www.stackage.org/lts/hoogle?q={searchTerms}"/>
<Query role="example" searchTerms="E.g. map, a -> a"/>
<moz:SearchForm>http://www.stackage.org</moz:SearchForm>
</OpenSearchDescription>

15
static/opensearchpackage.xml

@ -0,0 +1,15 @@
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Stackage Packages</ShortName>
<LongName>Stackage.org package page</LongName>
<Description>Just to a Stackage.org package page</Description>
<Developer>FP Complete CORP.</Developer>
<Attribution>Copyright FP Complete CORP.</Attribution>
<AdultContent>false</AdultContent>
<Language>en-us</Language>
<InputEncoding>UTF-8</InputEncoding>
<OutputEncoding>UTF-8</OutputEncoding>
<Image width="222" height="222" type="image/x-icon">http://www.stackage.org/static/img/stackage.png</Image>
<Url type="text/html" method="GET" template="http://www.stackage.org/package/{searchTerms}"/>
<Query role="example" searchTerms="E.g. bytestring"/>
<moz:SearchForm>http://www.stackage.org</moz:SearchForm>
</OpenSearchDescription>

3
templates/default-layout-wrapper.hamlet

@ -8,7 +8,8 @@ $newline never
<head>
<meta charset="UTF-8">
<link href="//fonts.googleapis.com/css?family=Lato:400,700" rel="stylesheet" type="text/css">
<link rel="search" type="application/opensearchdescription+xml" title="Stackage.org hoogle" href="/static/opensearchhoogle.xml">
<link rel="search" type="application/opensearchdescription+xml" title="Stackage.org package page" href="/static/opensearchpackage.xml">
<title>
#{pageTitle pc}
$if notHome

Loading…
Cancel
Save