refactor: update og image path

This commit is contained in:
jinhojang6 2023-08-30 22:18:38 +09:00
parent 9f6f5e9895
commit fe362ddec7
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ export default async function handler(request: NextRequest) {
contentType == null ? 'LOGOS→PRESS ENGINE' : searchParams.get('title') contentType == null ? 'LOGOS→PRESS ENGINE' : searchParams.get('title')
const image = searchParams.get('image') || '' const image = searchParams.get('image') || ''
const alt = searchParams.get('alt') || '' const alt = searchParams.get('alt') || ''
const pagePath = searchParams.get('pagePath') || '/' const pagePath = searchParams.get('pagePath') || 'press.logos.co'
const date = searchParams.get('date') const date = searchParams.get('date')
const imgSrc = image const imgSrc = image
@ -122,7 +122,7 @@ export default async function handler(request: NextRequest) {
fontFamily: 'Inter', fontFamily: 'Inter',
}} }}
> >
<p>{contentType ?? pagePath}</p> <p>{contentType ?? pagePath.replace(/^\/+/, '')}</p>
{date && <p></p>} {date && <p></p>}
{date && <p>{`${day} ${month} ${year}`}</p>} {date && <p>{`${day} ${month} ${year}`}</p>}
</div> </div>