import type { MetadataRoute } from "next"; import { BASE_GROUNDS } from "yt-dlp-transcript-common/lib/brand"; import { currentSite } from "./lib/site"; import { iconPalette } from "./lib/brand"; // Web App Manifest → statically emitted as /manifest.webmanifest at build time // (output: "export"). Per-site: name/description from currentSite(). Makes each // deployed export site installable as a standalone PWA. The icons are this // build's own — the site's accent, or the parent mark on the hub — rendered by // app/icons/[file]/route.ts. export const dynamic = "force-static"; export default function manifest(): MetadataRoute.Manifest { const site = currentSite(); return { name: site.siteTitle, short_name: site.headerTitle || site.siteTitle, description: site.siteDescription, start_url: "/", scope: "/", display: "standalone", // No `orientation` lock: the archive is mostly video, and landscape is the // right shape for the player view. // The splash is the icon's own ground, so the mark sits on its tile's // colour; the installed app's chrome is the dark base's ground. Neither is // the accent: the chrome is the ground a dark reader sees, whatever the // site's accent. background_color: iconPalette().ground, theme_color: BASE_GROUNDS.dark, icons: [ { src: "/icons/icon.svg", sizes: "any", type: "image/svg+xml", purpose: "any", }, { src: "/icons/icon-192.png", sizes: "192x192", type: "image/png", purpose: "any", }, { src: "/icons/icon-512.png", sizes: "512x512", type: "image/png", purpose: "any", }, { src: "/icons/maskable-512.png", sizes: "512x512", type: "image/png", purpose: "maskable", }, ], }; }