update,
This commit is contained in:
22
aastock/1/blog/app/og/route.tsx
Normal file
22
aastock/1/blog/app/og/route.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ImageResponse } from 'next/og'
|
||||
|
||||
export function GET(request: Request) {
|
||||
let url = new URL(request.url)
|
||||
let title = url.searchParams.get('title') || 'Next.js Portfolio Starter'
|
||||
|
||||
return new ImageResponse(
|
||||
(
|
||||
<div tw="flex flex-col w-full h-full items-center justify-center bg-white">
|
||||
<div tw="flex flex-col md:flex-row w-full py-12 px-4 md:items-center justify-between p-8">
|
||||
<h2 tw="flex flex-col text-4xl font-bold tracking-tight text-left">
|
||||
{title}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
{
|
||||
width: 1200,
|
||||
height: 630,
|
||||
}
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user