mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-04 23:16:53 +00:00
伪静态&刷新缓存时间
This commit is contained in:
@@ -52,7 +52,7 @@ export async function getStaticProps({ params: { category } }) {
|
||||
|
||||
return {
|
||||
props,
|
||||
revalidate: 1
|
||||
revalidate: BLOG.NEXT_REVALIDATE_SECOND
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export async function getStaticProps({ params: { category, page } }) {
|
||||
|
||||
return {
|
||||
props,
|
||||
revalidate: 1
|
||||
revalidate: BLOG.NEXT_REVALIDATE_SECOND
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import React from 'react'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import * as ThemeMap from '@/themes'
|
||||
import { getAllCategories } from '@/lib/notion/getAllCategories'
|
||||
import BLOG from '@/blog.config'
|
||||
|
||||
/**
|
||||
* 分类首页
|
||||
@@ -30,6 +31,6 @@ export async function getStaticProps() {
|
||||
delete props.categoryOptions
|
||||
return {
|
||||
props,
|
||||
revalidate: 1
|
||||
revalidate: BLOG.NEXT_REVALIDATE_SECOND
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user