mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
菜单Page可隐藏
This commit is contained in:
@@ -87,10 +87,12 @@ function getCustomNav({ allPage }) {
|
||||
const customNav = []
|
||||
if (allPage && allPage.length > 0) {
|
||||
allPage.forEach(p => {
|
||||
if (p?.slug?.indexOf('http') === 0) {
|
||||
customNav.push({ icon: p.icon || null, name: p.title, to: p.slug, show: true })
|
||||
} else {
|
||||
customNav.push({ icon: p.icon || null, name: p.title, to: '/' + p.slug, show: true })
|
||||
if (p?.status?.[0] === 'Published') {
|
||||
if (p?.slug?.indexOf('http') === 0) {
|
||||
customNav.push({ icon: p.icon || null, name: p.title, to: p.slug, show: true })
|
||||
} else {
|
||||
customNav.push({ icon: p.icon || null, name: p.title, to: '/' + p.slug, show: true })
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -253,7 +255,7 @@ async function getPageRecordMapByNotionAPI({ pageId, from }) {
|
||||
}
|
||||
|
||||
const allPage = data.filter(post => {
|
||||
return post.title && post?.status?.[0] === 'Published' && ['Page'].indexOf(post?.type?.[0]) > -1
|
||||
return post.title && (post?.status?.[0] === 'Published' || post?.status?.[0] === 'Invisible') && ['Page'].indexOf(post?.type?.[0]) > -1
|
||||
})
|
||||
const allPosts = data.filter(post => {
|
||||
return post.title && post?.status?.[0] === 'Published' && ['Post'].indexOf(post?.type?.[0]) > -1
|
||||
|
||||
Reference in New Issue
Block a user