/** * Renders `banner()` into `public/banner.png`, the Open Graph image of pages without their own and * the README's. Run from `apps/docs` after changing it, `node ./scripts/banner.ts`, and commit it. */ import { writeFile } from 'node:fs/promises'; import { render } from 'takumi-js'; import { unrun } from 'unrun'; const { module: og } = await unrun({ path: './app/og/[...slug]/generate.tsx', }); const options = await og.getImageResponseOptions(); await writeFile('./public/banner.png', await render(og.banner(), { ...options, format: 'png' }));