diff --git a/apps/marketing/src/assets/Inter-Bold.ttf b/apps/marketing/src/assets/Inter-Bold.ttf new file mode 100644 index 000000000..8e82c70d1 Binary files /dev/null and b/apps/marketing/src/assets/Inter-Bold.ttf differ diff --git a/apps/marketing/src/assets/background-blog-og.png b/apps/marketing/src/assets/background-blog-og.png new file mode 100644 index 000000000..d5d48a21a Binary files /dev/null and b/apps/marketing/src/assets/background-blog-og.png differ diff --git a/apps/marketing/src/pages/api/blog-og/index.tsx b/apps/marketing/src/pages/api/blog-og/index.tsx new file mode 100644 index 000000000..a9cecd696 --- /dev/null +++ b/apps/marketing/src/pages/api/blog-og/index.tsx @@ -0,0 +1,164 @@ +import { ImageResponse, NextRequest } from 'next/server'; + +export const config = { + runtime: 'edge', +}; + +export default async function handler(req: NextRequest) { + const { searchParams } = new URL(req.url); + const title = searchParams.get('title') || 'Document signing, finally open source.'; + + const [imageData, InterFontData] = await Promise.all([ + fetch(new URL('../../../assets/background-blog-og.png', import.meta.url)).then(async (res) => + res.arrayBuffer(), + ), + fetch(new URL('../../../assets/Inter-Bold.ttf', import.meta.url)).then(async (res) => + res.arrayBuffer(), + ), + ]); + + return new ImageResponse( + ( +