From fe362ddec7439017a841d203ff0693d9121a4115 Mon Sep 17 00:00:00 2001 From: jinhojang6 Date: Wed, 30 Aug 2023 22:18:38 +0900 Subject: [PATCH] refactor: update og image path --- src/pages/api/og.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/api/og.tsx b/src/pages/api/og.tsx index 283f894..7074282 100644 --- a/src/pages/api/og.tsx +++ b/src/pages/api/og.tsx @@ -26,7 +26,7 @@ export default async function handler(request: NextRequest) { contentType == null ? 'LOGOS→PRESS ENGINE' : searchParams.get('title') const image = searchParams.get('image') || '' const alt = searchParams.get('alt') || '' - const pagePath = searchParams.get('pagePath') || '/' + const pagePath = searchParams.get('pagePath') || 'press.logos.co' const date = searchParams.get('date') const imgSrc = image @@ -122,7 +122,7 @@ export default async function handler(request: NextRequest) { fontFamily: 'Inter', }} > -

{contentType ?? pagePath}

+

{contentType ?? pagePath.replace(/^\/+/, '')}

{date &&

} {date &&

{`${day} ${month} ${year}`}

}