Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix-notion-page-rss #1697

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix-notion-page-rss
  • Loading branch information
tangly1024 committed Dec 7, 2023
commit 7989fd0657fd7d243c7e7dc40a8990070b51c747
11 changes: 6 additions & 5 deletions components/NotionPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
3 changes: 2 additions & 1 deletion themes/simple/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
Loading