diff --git a/app/opengraph-image-assets/HankenGrotesk-Bold.ttf b/app/opengraph-image-assets/HankenGrotesk-Bold.ttf new file mode 100644 index 0000000..59eb24c Binary files /dev/null and b/app/opengraph-image-assets/HankenGrotesk-Bold.ttf differ diff --git a/app/opengraph-image-assets/HankenGrotesk-Regular.ttf b/app/opengraph-image-assets/HankenGrotesk-Regular.ttf new file mode 100644 index 0000000..8b01d15 Binary files /dev/null and b/app/opengraph-image-assets/HankenGrotesk-Regular.ttf differ diff --git a/app/opengraph-image.tsx b/app/opengraph-image.tsx new file mode 100644 index 0000000..6677c86 --- /dev/null +++ b/app/opengraph-image.tsx @@ -0,0 +1,102 @@ +import { Logo } from '@/components/Logo' +import { title, description, font } from '@/constants' +import { ImageResponse } from 'next/og' + +export const runtime = 'edge' + +export const alt = title +export const size = { width: 1200, height: 630 } +export const contentType = 'image/png' + +export default async function Image() { + const fontDataBold = await fetch( + new URL('./opengraph-image-assets/HankenGrotesk-Bold.ttf', import.meta.url) + ).then((res) => res.arrayBuffer()) + const fontDataRegular = await fetch( + new URL( + './opengraph-image-assets/HankenGrotesk-Regular.ttf', + import.meta.url + ) + ).then((res) => res.arrayBuffer()) + + return new ImageResponse( + ( +
+

+ + {title} +

+

+ {description} +

+

+ + + + + krema.eth +

+
+ ), + { + ...size, + fonts: [ + { + name: 'Hanken Grotesk', + data: fontDataBold, + style: 'normal', + weight: 700 + }, + { + name: 'Hanken Grotesk', + data: fontDataRegular, + style: 'normal', + weight: 400 + } + ] + } + ) +} diff --git a/app/opengraph-image.png b/app/xxxopengraph-image.png similarity index 100% rename from app/opengraph-image.png rename to app/xxxopengraph-image.png