]> git.ardis.lu - ardislu.dev/commitdiff
Add OpenSearch
authorArdis Lu <ardisglu@gmail.com>
Thu, 3 Aug 2023 06:48:19 +0000 (23:48 -0700)
committerArdis Lu <ardisglu@gmail.com>
Thu, 3 Aug 2023 06:48:19 +0000 (23:48 -0700)
functions/atom.xml.js
index.html
opensearch.osdx [new file with mode: 0644]

index 2bb61348d097da882c8e64a9fb2ffbd277c6037e..4e1af29ed359426135fccb13a6736d63018cf5f6 100644 (file)
@@ -22,7 +22,7 @@ export async function onRequestGet({ env }) {
     });
 
   const feed = `<?xml version="1.0" encoding="utf-8"?>
-<feed xmlns="http://www.w3.org/2005/Atom">
+<feed xmlns="http://www.w3.org/2005/Atom" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
 
   <id>https://ardislu.dev/</id>
   <title>ardislu.dev</title>
@@ -32,6 +32,7 @@ export async function onRequestGet({ env }) {
   </author>
   <link href="https://ardislu.dev/"/>
   <link rel="self" href="https://ardislu.dev/atom.xml"/>
+  <link rel="search" href="https://ardislu.dev/opensearch.osdx" type="application/opensearchdescription+xml" title="ardislu.dev"/>
   <updated>${new Date(Math.max(...updatedDates)).toISOString()}</updated>
 
   ${entries.join('\n  ')}
index 3d4bf284e3440811a62847c1c80683cdc0996c6c..26d8247c6f2f70328a3b2ef6dc5f937d51ad234a 100644 (file)
@@ -17,6 +17,7 @@
   <link rel="icon" href="/logo.svg" type="image/svg+xml">
   <link rel="apple-touch-icon" href="/logo_maskable.png">
   <link rel="manifest" href="/manifest.webmanifest">
+  <link rel="search" href="https://ardislu.dev/opensearch.osdx" type="application/opensearchdescription+xml" title="ardislu.dev">
   <style>
     @layer fonts, base, print, hljs;
 
diff --git a/opensearch.osdx b/opensearch.osdx
new file mode 100644 (file)
index 0000000..3311cc0
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
+  <ShortName>ardislu.dev</ShortName>
+  <Description>Search for posts on ardislu.dev</Description>
+  <Tags>web ethereum crypto blockchain self-hosting tech blog post article</Tags>
+  <Contact>ardis@ardislu.dev</Contact>
+  <Image height="16" width="16" type="image/svg+xml">https://ardislu.dev/logo.svg</Image>
+  <Image height="512" width="512" type="image/png">https://ardislu.dev/logo.png</Image>
+  <Url type="application/opensearchdescription+xml" rel="self" template="https://ardislu.dev/opensearch.osdx"/>
+  <Url type="text/html" template="https://ardislu.dev/search?q={searchTerms}"/>
+  <Query role="example" searchTerms="ethereum"/>
+</OpenSearchDescription>
\ No newline at end of file
This page took 0.048348 seconds and 4 git commands to generate.