Skip to content

Commit

Permalink
Added support for opensearchdescription.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Oct 9, 2024
1 parent fb6e8c2 commit 049a64e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions webclient/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ export default defineNuxtConfig({
charset: "utf-8",
viewport: "width=device-width, initial-scale=1",
link: [
{
rel: "search",
title: "searchTitle",
type: "application/opensearchdescription+xml",
href: "/opensearchdescription.xml",
},
{ rel: "apple-touch-icon", sizes: "180x180", href: "/favicons/apple-touch-icon.png" },
{ rel: "icon", type: "image/png", sizes: "32x32", href: "/favicons/favicon-32x32.png" },
{ rel: "icon", type: "image/png", sizes: "16x16", href: "/favicons/favicon-16x16.png" },
Expand Down
9 changes: 9 additions & 0 deletions webclient/public/.well-known/opensearchdescription.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<OpenSearchDescription>
<ShortName>NavigaTUM</ShortName>
<Description>
Search for rooms, buildings and other places at the university
</Description>
<Url type="text/html" template="https://nav.tum.de/search?q={searchTerms}"/>
<Url type="application/json" rel="suggestions" template="https://nav.tum.de/api/search?q={searchTerms}"/>
<Image width="32" height="32">https://nav.tum.de/favicon.ico</Image>
</OpenSearchDescription>

0 comments on commit 049a64e

Please sign in to comment.