Support for opensearch.xml

This commit is contained in:
Joshua Higgins
2025-07-22 18:06:24 -04:00
parent dae24c06b4
commit e2a2c5d258
2 changed files with 19 additions and 0 deletions

View File

@@ -18,6 +18,12 @@
as="style" as="style"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
/> />
<link
rel="search"
type="application/opensearchdescription+xml"
title="Unduck"
href="/opensearch.xml"
/>
<link <link
rel="stylesheet" rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"

13
public/opensearch.xml Normal file
View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Unduck</ShortName>
<Description>A better default search engine (with bangs!)</Description>
<Tags>unduck bangs</Tags>
<Url rel="results" type="text/html" method="GET" template="https://unduck.abunchofknowitalls.com/?q={searchTerms}"/>
<Url rel="suggestions" type="application/x-suggestions+json" template="https://unduck.abunchofknowitalls.com/autocompleter?q={searchTerms}"/>
<Url rel="self" type="application/opensearchdescription+xml" method="GET" template="https://unduck.abunchofknowitalls.com/opensearch.xml" />
<Image height="16" width="16" type="image/svg+xml">https://unduck.abunchofknowitalls.com/search.svg</Image>
<InputEncoding>UTF-8</InputEncoding>
<OutputEncoding>UTF-8</OutputEncoding>
<Query role="example" searchTerms="cats !g"/>
</OpenSearchDescription>