From 5ba9ce51cded84e8fa37d917461aa03a50258a2d Mon Sep 17 00:00:00 2001 From: Taesu <166604494+bytaesu@users.noreply.github.com> Date: Sat, 17 Oct 2026 07:40:55 +0000 Subject: [PATCH] docs: redesign docs OG image (#11888) --- docs/app/api/og-release/route.tsx | 171 --------------- docs/app/api/og/route.tsx | 322 ++++++++++++++--------------- docs/app/blog/layout.tsx | 4 +- docs/app/docs/[[...slug]]/page.tsx | 10 +- docs/lib/rss.ts | 2 +- 5 files changed, 161 insertions(+), 348 deletions(-) delete mode 100644 docs/app/api/og-release/route.tsx diff --git a/docs/app/api/og-release/route.tsx b/docs/app/api/og-release/route.tsx deleted file mode 100644 index 4d76eb8070..0000000000 --- a/docs/app/api/og-release/route.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import { ImageResponse } from "@vercel/og"; -import * as z from "zod"; -export const runtime = "edge"; - -const ogSchema = z.object({ - heading: z.string(), - description: z.string().optional(), - date: z.string().optional(), -}); - -export async function GET(req: Request) { - try { - const geist = await fetch( - new URL("../../../assets/Geist.ttf", import.meta.url), - ).then((res) => res.arrayBuffer()); - - const url = new URL(req.url); - const urlParamsValues = Object.fromEntries(url.searchParams); - const validParams = ogSchema.parse(urlParamsValues); - - const { heading, description, date } = validParams; - const trueHeading = - heading.length > 140 ? `${heading.substring(0, 140)}...` : heading; - - return new ImageResponse( -
-
-
- -
-