mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
归档文章数量修复
This commit is contained in:
@@ -28,7 +28,11 @@ export async function getGlobalNotionData ({
|
||||
const notionPageData = await getNotionPageData({ pageId, from })
|
||||
const tagOptions = notionPageData.tagOptions
|
||||
const allPosts = await getAllPosts({ notionPageData, from, includePage })
|
||||
const postCount = allPosts?.length
|
||||
const postCount = allPosts?.filter(post =>
|
||||
post.title && post.slug &&
|
||||
post?.status?.[0] === 'Published' &&
|
||||
(post?.type?.[0] === 'Post')
|
||||
)?.length
|
||||
const categories = await getAllCategories(allPosts)
|
||||
const tags = await getAllTags({ allPosts, tagOptions, sliceCount: tagsCount })
|
||||
// 深拷贝
|
||||
|
||||
Reference in New Issue
Block a user