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