mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-08 23:16:54 +00:00
伪静态&刷新缓存时间
This commit is contained in:
@@ -48,7 +48,7 @@ export async function getStaticProps({ params: { keyword } }) {
|
||||
props.keyword = keyword
|
||||
return {
|
||||
props,
|
||||
revalidate: 1
|
||||
revalidate: BLOG.NEXT_REVALIDATE_SECOND
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export async function getStaticProps({ params: { keyword, page } }) {
|
||||
props.page = page
|
||||
return {
|
||||
props,
|
||||
revalidate: 1
|
||||
revalidate: BLOG.NEXT_REVALIDATE_SECOND
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import { getGlobalNotionData } from '@/lib/notion/getNotionData'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import { useRouter } from 'next/router'
|
||||
import * as ThemeMap from '@/themes'
|
||||
import BLOG from '@/blog.config'
|
||||
|
||||
const Search = props => {
|
||||
const { posts, siteInfo } = props
|
||||
@@ -58,7 +59,7 @@ export async function getStaticProps() {
|
||||
props.posts = allPosts
|
||||
return {
|
||||
props,
|
||||
revalidate: 1
|
||||
revalidate: BLOG.NEXT_REVALIDATE_SECOND
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user