mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 15:09:47 +00:00
📬
This commit is contained in:
@@ -12,7 +12,7 @@ import useDarkMode from 'use-dark-mode'
|
||||
import { NotionRenderer, Code, Collection, CollectionRow } from 'react-notion-x'
|
||||
|
||||
// utils
|
||||
import { getBlockTitle, parsePageId } from 'notion-utils'
|
||||
import { getBlockTitle } from 'notion-utils'
|
||||
import { mapPageUrl, getCanonicalPageUrl } from 'lib/map-page-url'
|
||||
import { mapNotionImageUrl } from 'lib/map-image-url'
|
||||
import { getPageDescription } from 'lib/get-page-description'
|
||||
@@ -113,8 +113,8 @@ export const NotionPage: React.FC<types.PageProps> = ({
|
||||
const canonicalPageUrl =
|
||||
!config.isDev && getCanonicalPageUrl(site, recordMap)(pageId)
|
||||
|
||||
const isRootPage =
|
||||
parsePageId(block.id) === parsePageId(site.rootNotionPageId)
|
||||
// const isRootPage =
|
||||
// parsePageId(block.id) === parsePageId(site.rootNotionPageId)
|
||||
const isBlogPost =
|
||||
block.type === 'page' && block.parent_table === 'collection'
|
||||
const showTableOfContents = !!isBlogPost
|
||||
|
||||
Reference in New Issue
Block a user