mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
build:
编译修复
This commit is contained in:
@@ -1,31 +1,28 @@
|
||||
import BLOG from '@/blog.config'
|
||||
|
||||
import { useRouter } from 'next/router'
|
||||
import Progress from '@/components/Progress'
|
||||
import TagItem from '@/components/TagItem'
|
||||
import formatDate from '@/lib/formatDate'
|
||||
import { Code, Collection, CollectionRow, Equation, NotionRenderer } from 'react-notion-x'
|
||||
import ShareBar from '@/components/ShareBar'
|
||||
import BlogAround from '@/components/BlogAround'
|
||||
import Comment from '@/components/Comment'
|
||||
import Link from 'next/link'
|
||||
import Image from 'next/image'
|
||||
|
||||
import 'prismjs'
|
||||
import 'prismjs/components/prism-bash'
|
||||
import 'prismjs/components/prism-markup'
|
||||
import 'prismjs/components/prism-python'
|
||||
import 'prismjs/components/prism-javascript'
|
||||
import 'prismjs/components/prism-typescript'
|
||||
import RecommendPosts from '@/components/RecommendPosts'
|
||||
import ShareBar from '@/components/ShareBar'
|
||||
import TagItem from '@/components/TagItem'
|
||||
import TocDrawer from '@/components/TocDrawer'
|
||||
import TocDrawerButton from '@/components/TocDrawerButton'
|
||||
import formatDate from '@/lib/formatDate'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faEye, faFolderOpen } from '@fortawesome/free-solid-svg-icons'
|
||||
import BlogAround from '@/components/BlogAround'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import { useRouter } from 'next/router'
|
||||
import 'prismjs'
|
||||
import 'prismjs/components/prism-bash'
|
||||
import 'prismjs/components/prism-javascript'
|
||||
import 'prismjs/components/prism-markup'
|
||||
import 'prismjs/components/prism-python'
|
||||
import 'prismjs/components/prism-typescript'
|
||||
import { useRef } from 'react'
|
||||
import WordCount from './WordCount'
|
||||
import { Code, Collection, CollectionRow, Equation, NotionRenderer } from 'react-notion-x'
|
||||
import ArticleCopyright from './ArticleCopyright'
|
||||
import WordCount from './WordCount'
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -8,7 +8,6 @@ import { faAngleDoubleRight, faChartBar, faThList } from '@fortawesome/free-soli
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import Link from 'next/link'
|
||||
import React from 'react'
|
||||
import Progress from './Progress'
|
||||
|
||||
/**
|
||||
* 侧边平铺
|
||||
|
||||
8
lib/cache/cache_manager.js
vendored
8
lib/cache/cache_manager.js
vendored
@@ -1,5 +1,5 @@
|
||||
// import { getCacheFromMemory, setCacheToMemory } from '@/lib/cache/memory_cache'
|
||||
import { getCacheFromFile, setCacheToFile } from './local_file_cache'
|
||||
import { getCacheFromMemory, setCacheToMemory } from '@/lib/cache/memory_cache'
|
||||
// import { getCacheFromFile, setCacheToFile } from './local_file_cache'
|
||||
const enableCache = true // 生产环境禁用
|
||||
|
||||
/**
|
||||
@@ -11,7 +11,7 @@ export async function getDataFromCache (key) {
|
||||
if (!enableCache) {
|
||||
return null
|
||||
}
|
||||
const dataFromCache = await getCacheFromFile(key)
|
||||
const dataFromCache = await getCacheFromMemory(key)
|
||||
if (JSON.stringify(dataFromCache) === '[]') {
|
||||
return null
|
||||
}
|
||||
@@ -22,5 +22,5 @@ export async function setDataToCache (key, data) {
|
||||
if (!enableCache || !data) {
|
||||
return
|
||||
}
|
||||
await setCacheToFile(key, data)
|
||||
await setCacheToMemory(key, data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user