feat(og): migrate to co-located opengraph-image.tsx convention

This commit is contained in:
2026-02-17 11:57:46 +01:00
parent e2c9ec507f
commit 28053952ea
7 changed files with 143 additions and 72 deletions

View File

@@ -0,0 +1,23 @@
import { ImageResponse } from "next/og";
import { OGImageTemplate } from "../../src/components/OGImageTemplate";
import { getOgFonts, OG_IMAGE_SIZE } from "../../src/lib/og-helper";
export const size = OG_IMAGE_SIZE;
export const contentType = "image/png";
export const runtime = "nodejs";
export default async function Image() {
const fonts = await getOgFonts();
return new ImageResponse(
<OGImageTemplate
title="Kontakt."
description="Bereit für eine Zusammenarbeit? Lassen Sie uns gemeinsam etwas bauen, das wirklich funktioniert."
label="Get in touch"
/>,
{
...OG_IMAGE_SIZE,
fonts: fonts as any,
},
);
}