Skip to content

Commit 6283497

Browse files
committed
fix: resolve ReferenceError for undefined isBlogPost in PageHead component
- Add isBlogPost as optional boolean prop to PageHead component - Pass isBlogPost prop from NotionPage to PageHead component - Fixes runtime error when rendering blog post structured data
1 parent 1834e29 commit 6283497

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

components/NotionPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ export function NotionPage({
297297
description={socialDescription}
298298
image={socialImage}
299299
url={canonicalPageUrl}
300+
isBlogPost={isBlogPost}
300301
/>
301302

302303
{isLiteMode && <BodyClassName className='notion-lite' />}

components/PageHead.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ export function PageHead({
1010
description,
1111
pageId,
1212
image,
13-
url
13+
url,
14+
isBlogPost
1415
}: types.PageProps & {
1516
title?: string
1617
description?: string
1718
image?: string
1819
url?: string
20+
isBlogPost?: boolean
1921
}) {
2022
const rssFeedUrl = `${config.host}/feed`
2123

0 commit comments

Comments
 (0)