From 7989fd0657fd7d243c7e7dc40a8990070b51c747 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Thu, 7 Dec 2023 11:11:29 +0800 Subject: [PATCH] fix-notion-page-rss --- components/NotionPage.js | 11 ++++++----- themes/simple/index.js | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/components/NotionPage.js b/components/NotionPage.js index a2586295..fb68691a 100644 --- a/components/NotionPage.js +++ b/components/NotionPage.js @@ -5,13 +5,14 @@ import 'katex/dist/katex.min.css' import { mapImgUrl } from '@/lib/notion/mapImage' import { isBrowser } from '@/lib/utils' import { siteConfig } from '@/lib/config' +import { NotionRenderer } from 'react-notion-x' // Notion渲染 -const NotionRenderer = dynamic(() => import('react-notion-x').then(async (m) => { - return m.NotionRenderer -}), { - ssr: false -}) +// const NotionRenderer = dynamic(() => import('react-notion-x').then(async (m) => { +// return m.NotionRenderer +// }), { +// ssr: false +// }) const Code = dynamic(() => import('react-notion-x/build/third-party/code').then(async (m) => { diff --git a/themes/simple/index.js b/themes/simple/index.js index 46c3174a..8295d621 100644 --- a/themes/simple/index.js +++ b/themes/simple/index.js @@ -9,12 +9,13 @@ import Link from 'next/link' import { Style } from './style' import replaceSearchResult from '@/components/Mark' import dynamic from 'next/dynamic' +import NotionPage from '@/components/NotionPage' +// const NotionPage = dynamic(() => import('@/components/NotionPage'), { ssr: false }); // 主题组件 const BlogListScroll = dynamic(() => import('./components/BlogListScroll'), { ssr: false }); const BlogArchiveItem = dynamic(() => import('./components/BlogArchiveItem'), { ssr: false }); const ArticleLock = dynamic(() => import('./components/ArticleLock'), { ssr: false }); -const NotionPage = dynamic(() => import('@/components/NotionPage'), { ssr: false }); const ArticleInfo = dynamic(() => import('./components/ArticleInfo'), { ssr: false }); const Comment = dynamic(() => import('@/components/Comment'), { ssr: false }); const ArticleAround = dynamic(() => import('./components/ArticleAround'), { ssr: false });