Add opensearch support

This commit is contained in:
Leopardus 2021-04-06 01:23:14 +02:00
parent 4a42a25ed3
commit c8805f1078
2 changed files with 13 additions and 0 deletions

11
static/opensearch.xml Normal file
View File

@ -0,0 +1,11 @@
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Search Libreddit</ShortName>
<Description>Search for whatever you want on Libreddit, awesome Reddit frontend</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="32" height="32" type="image/x-icon">/favicon.ico</Image>
<Url type="text/html" template="/search">
<Param name="q" value="{searchTerms}"/>
</Url>
<moz:SearchForm>/search</moz:SearchForm>
</OpenSearchDescription>

View File

@ -16,6 +16,8 @@
<meta name="mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes">
<!-- iOS Logo --> <!-- iOS Logo -->
<link href="/touch-icon-iphone.png" rel="apple-touch-icon"> <link href="/touch-icon-iphone.png" rel="apple-touch-icon">
<!-- OpenSearch description file -->
<link rel="search" type="application/opensearchdescription+xml" title="Search Libreddit" href="/opensearch.xml">
<!-- PWA Manifest --> <!-- PWA Manifest -->
<link rel="manifest" type="application/json" href="/manifest.json"> <link rel="manifest" type="application/json" href="/manifest.json">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"> <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">