import { readFile, writeFile } from "node:fs/promises"; // metadata-gen 0.2.2 uses a lettermark for SVG even when faviconSrc is a logo. // Keep the SVG consistent with its generated PNG/ICO set and legible in both themes. const root = new URL("../public/metadata/", import.meta.url); const mark = await readFile(new URL("mark.svg", root), "utf8"); const favicon = mark.replace( ':root { --fg: #171717; } @media (prefers-color-scheme: dark) { :root { --fg: #fafafa; } }