diff --git a/app/view/[id]/route.ts b/app/view/[id]/route.ts index a9740d5..472efec 100644 --- a/app/view/[id]/route.ts +++ b/app/view/[id]/route.ts @@ -38,6 +38,7 @@ export async function GET( const { _og_title, _og_description, _og_url } = storedParams; const imageUrl = `${baseUrl}/api/generate-share/${id}`; + const pageUrl = `${baseUrl}/view/${id}`; const editUrl = `/?_share=${id}`; const title = _og_title || 'Slide'; const safeOgUrl = _og_url && isSafeUrl(_og_url) ? _og_url : null; @@ -48,15 +49,17 @@ export async function GET( ${esc(title)} - + + + + ${_og_description ? `` : ''} - ${safeOgUrl ? `` : ''} + ${proto === 'https' ? `` : ''} - ${_og_description ? `` : ''} diff --git a/app/view/route.ts b/app/view/route.ts index 8bc1545..905d91a 100644 --- a/app/view/route.ts +++ b/app/view/route.ts @@ -24,6 +24,7 @@ export async function GET(request: NextRequest) { const { _og_title, _og_description, _og_url, ...templateParams } = params; const imageUrl = `${baseUrl}/api/generate?${new URLSearchParams(templateParams).toString()}`; + const pageUrl = `${baseUrl}/view?${request.nextUrl.searchParams.toString()}`; const editUrl = `/?${new URLSearchParams(params).toString()}`; const title = _og_title || params.title || 'Slide'; @@ -33,14 +34,16 @@ export async function GET(request: NextRequest) { ${esc(title)} - + + + + ${_og_description ? `` : ''} - ${_og_url ? `` : ''} + ${proto === 'https' ? `` : ''} - ${_og_description ? `` : ''}