This commit is contained in:
Chris Tate
2026-02-20 08:49:53 -06:00
committed by GitHub
parent 2b8a51b9a6
commit fca9d7ab5d
21 changed files with 247 additions and 15 deletions
+16
View File
@@ -0,0 +1,16 @@
import { NextResponse } from "next/server";
import { getPageTitle, renderOgImage } from "../og-image";
export async function GET(
_request: Request,
{ params }: { params: Promise<{ slug: string[] }> },
) {
const { slug } = await params;
const title = getPageTitle(slug.join("/"));
if (!title) {
return NextResponse.json({ error: "Not found" }, { status: 404 });
}
return renderOgImage(title);
}