fix: og url error

This commit is contained in:
radishzzz 2025-03-13 00:29:24 +00:00
parent c97e3d5882
commit 66d055f512
2 changed files with 4 additions and 3 deletions

View file

@ -31,9 +31,10 @@ const pathParts = currentPath.split('/').filter(part => part !== '')
const slug = pathParts.length > 0 ? pathParts[pathParts.length - 1] : ''
// Prioritize auto-generated OG image, otherwise use fallback OG image
const pageImage = isPost && slug ? `${url}/og/${slug}` : favicon
const pageImage = isPost && slug
? `${url}/og/${slug}.png`
: (favicon.startsWith('http') ? favicon : `${url}${favicon}`)
---
<head>
<!-- Basic info -->
<meta charset="utf-8" />