mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-25 07:26:49 +00:00
Prism微调
This commit is contained in:
@@ -105,7 +105,11 @@ export async function getStaticProps({ params: { slug } }) {
|
||||
})
|
||||
|
||||
if (!props.post) {
|
||||
const post = await getNotion(slug.slice(-1)[0])
|
||||
const pageId = slug.slice(-1)[0]
|
||||
if (pageId.length < 32) {
|
||||
return { props, revalidate: 1 }
|
||||
}
|
||||
const post = await getNotion(pageId)
|
||||
if (post) {
|
||||
props.post = post
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user