From 8e65fd396e10cafce9762cb11d253fa4d2158932 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Mon, 9 Feb 2026 22:24:29 +0000 Subject: [PATCH] Add manifest generator --- src/routes/manifest.webmanifest/+server.ts | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/routes/manifest.webmanifest/+server.ts diff --git a/src/routes/manifest.webmanifest/+server.ts b/src/routes/manifest.webmanifest/+server.ts new file mode 100644 index 0000000..b803845 --- /dev/null +++ b/src/routes/manifest.webmanifest/+server.ts @@ -0,0 +1,30 @@ +import { json } from "@sveltejs/kit"; +import type { RequestHandler } from './$types'; +import favicon from '$lib/assets/favicon.svg?url'; + +export const prerender = true; + +export const GET: RequestHandler = ({ url }) => { + const manifest = { + name: "OwlBoard Maps", + short_name: "OwlBoard Maps", + start_url: "/", + display: "standalone", + theme_color: "#ff6600", + background_color: "#ffffff", + icons: [ + { + src: favicon, + sizes: "any", + type: "image/svg+xml" + } + ] + }; + + return json(manifest, { + headers: { + 'Content-Type': 'application/manifest+json', + 'Cache-Control': 'public, max-age=3600', + } + }) +} \ No newline at end of file