// Renders the Meetings showcase's Open Graph / Twitter card // (public/meetings/og-meetings.png, 1200 × 630): the Hex mark, "Hex Meetings", // one line, and the meeting pill Hex shows when a call starts. It gives away // nothing of the show itself. Regenerate with `bun run generate:og-meetings`. import { chromium } from "playwright" import { readFileSync } from "node:fs" import { fileURLToPath } from "node:url" const font = readFileSync(new URL("../../node_modules/@fontsource-variable/inter/files/inter-latin-wght-normal.woff2", import.meta.url)).toString("base64") const mark = (size: number, stroke: string) => ` ` const html = `
${mark(68, "#f3f3f0")}

Hex Meetings

Local meeting transcripts & notes on your Mac.

${mark(26, "#ecece8")} Q4 sync·detected Record
` // CHROMIUM_PATH points at another Chromium when Playwright's own isn't downloaded. const browser = await chromium.launch({ headless: true, executablePath: process.env.CHROMIUM_PATH }) try { const page = await browser.newPage({ viewport: { width: 1200, height: 630 }, deviceScaleFactor: 1 }) await page.setContent(html) await page.evaluate(() => document.fonts.ready) await page.screenshot({ path: fileURLToPath(new URL("../../public/meetings/og-meetings.png", import.meta.url)) }) } finally { await browser.close() }