mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-16 07:26:47 +00:00
@@ -7,8 +7,8 @@ import { isBrowser } from '@/lib/utils'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import { Code } from 'react-notion-x/build/third-party/code'
|
||||
import { Pdf } from 'react-notion-x/build/third-party/pdf'
|
||||
import { Equation } from 'react-notion-x/build/third-party/equation'
|
||||
// import { Pdf } from 'react-notion-x/build/third-party/pdf'
|
||||
// import { Equation } from 'react-notion-x/build/third-party/equation'
|
||||
|
||||
import 'prismjs/components/prism-bash.js'
|
||||
import 'prismjs/components/prism-markup-templating.js'
|
||||
@@ -43,8 +43,19 @@ import 'prismjs/components/prism-wasm.js'
|
||||
import 'prismjs/components/prism-yaml.js'
|
||||
import 'prismjs/components/prism-r.js'
|
||||
|
||||
// 化学方程式
|
||||
import '@/lib/mhchem'
|
||||
const Equation = dynamic(() =>
|
||||
import('react-notion-x/build/third-party/equation').then(async (m) => {
|
||||
// 化学方程式
|
||||
await import('@/lib/mhchem')
|
||||
return m.Equation
|
||||
})
|
||||
)
|
||||
const Pdf = dynamic(
|
||||
() => import('react-notion-x/build/third-party/pdf').then((m) => m.Pdf),
|
||||
{
|
||||
ssr: false
|
||||
}
|
||||
)
|
||||
|
||||
// https://github.com/txs
|
||||
// import PrismMac from '@/components/PrismMac'
|
||||
|
||||
@@ -120,7 +120,7 @@ async function filterByMemCache(allPosts, keyword) {
|
||||
const tagContent = post.tags && Array.isArray(post.tags) ? post.tags.join(' ') : ''
|
||||
const categoryContent = post.category && Array.isArray(post.category) ? post.category.join(' ') : ''
|
||||
const articleInfo = post.title + post.summary + tagContent + categoryContent
|
||||
let hit = articleInfo.indexOf(keyword) > -1
|
||||
let hit = articleInfo.toLowerCase().indexOf(keyword) > -1
|
||||
let indexContent = [post.summary]
|
||||
if (page && page.block) {
|
||||
const contentIds = Object.keys(page.block)
|
||||
|
||||
@@ -1941,4 +1941,8 @@ pre[class*='language-'] {
|
||||
|
||||
.pre-mac > span:nth-child(3) {
|
||||
background: limegreen;
|
||||
}
|
||||
|
||||
.notion-asset-wrapper-pdf > div {
|
||||
display: block !important;
|
||||
}
|
||||
@@ -72,4 +72,8 @@ pre[class*='language-'] {
|
||||
pre[class*="language-mermaid"] {
|
||||
background: transparent !important;
|
||||
@apply dark:bg-gray-200 !important;
|
||||
}
|
||||
|
||||
.line-numbers-rows > span {
|
||||
height:auto !important;
|
||||
}
|
||||
Reference in New Issue
Block a user