= ({
'Logos online publishing and blogging platform for writers and readers.'
}
title={`${data.page.title} - Logos Press Engine`}
+ pagePath={`/${data.page.slug}`}
/>
>
diff --git a/src/pages/api/og.tsx b/src/pages/api/og.tsx
index 4881947..471635d 100644
--- a/src/pages/api/og.tsx
+++ b/src/pages/api/og.tsx
@@ -21,10 +21,12 @@ export default async function handler(request: NextRequest) {
).then((res) => res.arrayBuffer())
const searchParams = new URL(href).searchParams
- const title = searchParams.get('title') || 'LOGOS→PRESS ENGINE'
+ const contentType = searchParams.get('contentType')
+ const title =
+ contentType == null ? 'LOGOS→PRESS ENGINE' : searchParams.get('title')
const image = searchParams.get('image') || ''
const alt = searchParams.get('alt') || ''
- const contentType = searchParams.get('contentType')
+ const pagePath = searchParams.get('pagePath') || '/'
const date = searchParams.get('date')
const imgSrc = image
@@ -120,7 +122,7 @@ export default async function handler(request: NextRequest) {
fontFamily: 'Inter',
}}
>
- {contentType ?? '/'}
+ {contentType ?? pagePath}
{date && ∙
}
{date && {`${day} ${month} ${year}`}
}
diff --git a/src/pages/search.tsx b/src/pages/search.tsx
index 5d739bd..326897d 100644
--- a/src/pages/search.tsx
+++ b/src/pages/search.tsx
@@ -90,6 +90,7 @@ export default function SearchPage({ topics, shows }: SearchPageProps) {
'Logos online publishing and blogging platform for writers and readers.'
}
title={'Logos Press Engine'}
+ pagePath={`/search`}
/>