diff --git a/app/root.tsx b/app/root.tsx index d2eb64e..58858c3 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -8,8 +8,6 @@ import { import React from "react" import { ManifestLink } from "@remix-pwa/sw" -import manifest from "./site.webmanifest" - export function Layout({ children }: { children: React.ReactNode }) { return ( @@ -17,7 +15,7 @@ export function Layout({ children }: { children: React.ReactNode }) { - + diff --git a/app/routes/manifest[.webmanifest].ts b/app/routes/manifest[.webmanifest].ts new file mode 100644 index 0000000..8007586 --- /dev/null +++ b/app/routes/manifest[.webmanifest].ts @@ -0,0 +1,35 @@ +import type { WebAppManifest } from "@remix-pwa/dev" +import { json } from "@remix-run/node" + +export const loader = () => { + return json( + { + name: "Tack Up Now!", + short_name: "Tack Up Now!", + icons: [ + { + src: "./images/android-chrome-192x192.png", + sizes: "192x192", + type: "image/png", + }, + { + src: "./images/android-chrome-512x512.png", + sizes: "512x512", + type: "image/png", + }, + ], + theme_color: "#ffffff", + background_color: "#ffffff", + display: "standalone", + description: "Notifications for equinelive.com", + start_url: "/", + id: "tackupnow.com", + } as WebAppManifest, + { + headers: { + "Cache-Control": "public, max-age=600", + "Content-Type": "application/manifest+json", + }, + } + ) +} diff --git a/app/site.webmanifest b/app/site.webmanifest deleted file mode 100644 index c048c50..0000000 --- a/app/site.webmanifest +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "Tack Up Now!", - "short_name": "Tack Up Now!", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone", - "description": "Notifications for equinelive.com", - "start_url": "/", - "id": "tackupnow.com" -} \ No newline at end of file