mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
访问 隐藏单页
This commit is contained in:
@@ -34,7 +34,12 @@ export async function getAllPosts({ notionPageData, from, pageType }) {
|
||||
|
||||
// remove all the the items doesn't meet requirements
|
||||
const posts = data.filter(post => {
|
||||
return post.title && post?.status?.[0] === 'Published' && pageType.indexOf(post?.type?.[0]) > -1
|
||||
if (pageType === 'Post') {
|
||||
return post.title && post?.status?.[0] === 'Published' && pageType.indexOf(post?.type?.[0]) > -1
|
||||
} else {
|
||||
// 隐藏单页
|
||||
return post.title && (post?.status?.[0] === 'Published' || post?.status?.[0] === 'Invisible') && pageType.indexOf(post?.type?.[0]) > -1
|
||||
}
|
||||
})
|
||||
|
||||
if (!posts || posts.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user