// Post-build: give build/play.html its own social/canonical metadata. // // The app is a static SPA (ssr=false), so every prerendered shell ships app.html's // HOMEPAGE
— meaning a shared /play link previews as the news homepage. Client // svelte:head can't fix that for non-JS social scrapers (Twitter/Slack/iMessage/etc.). // So we rewrite the static head of play.html here, at build time. Deep-linked variants // (/play?game=…) are served the same file, so they inherit this games-hub preview. import { readFile, writeFile } from 'node:fs/promises'; const FILE = new URL('../build/play.html', import.meta.url); const URL_PLAY = 'https://upbeatbytes.com/play'; const TITLE = 'Play · Upbeat Bytes — calm daily games'; const DESC = 'A calm set of daily games — Daily Word, Word Search, Bloom, and Memory Match. ' + 'A friendly little break from the doomscroll.'; const subs = [ [/