24 lines
635 B
TypeScript
24 lines
635 B
TypeScript
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="Marc Mintel"
|
|
description="Technical problem solver's blog - practical insights and learning notes"
|
|
label="Engineering"
|
|
/>,
|
|
{
|
|
...OG_IMAGE_SIZE,
|
|
fonts: fonts as any,
|
|
},
|
|
);
|
|
}
|