From 6283497c771cc4e5f6004fb173b6af2c608ae0c5 Mon Sep 17 00:00:00 2001 From: Armruo Date: Sun, 20 Jul 2025 09:49:32 +0800 Subject: [PATCH] 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 --- components/NotionPage.tsx | 1 + components/PageHead.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/NotionPage.tsx b/components/NotionPage.tsx index 27b0aa5..698ab1c 100644 --- a/components/NotionPage.tsx +++ b/components/NotionPage.tsx @@ -297,6 +297,7 @@ export function NotionPage({ description={socialDescription} image={socialImage} url={canonicalPageUrl} + isBlogPost={isBlogPost} /> {isLiteMode && } diff --git a/components/PageHead.tsx b/components/PageHead.tsx index c83f925..0ede51f 100644 --- a/components/PageHead.tsx +++ b/components/PageHead.tsx @@ -10,12 +10,14 @@ export function PageHead({ description, pageId, image, - url + url, + isBlogPost }: types.PageProps & { title?: string description?: string image?: string url?: string + isBlogPost?: boolean }) { const rssFeedUrl = `${config.host}/feed`