diff --git a/lib/notion/getNotionData.js b/lib/notion/getNotionData.js index 50c84696..11913b2d 100644 --- a/lib/notion/getNotionData.js +++ b/lib/notion/getNotionData.js @@ -215,6 +215,9 @@ async function getPageRecordMapByNotionAPI({ pageId, from }) { // 读取映射 配置 let postCount = 0 + // 获取page作为自定义菜单 + const customNav = getCustomNav({ allPages: collectionData.filter(post => post.type === 'Page' && post.status === 'Published') }) + const allPages = collectionData.filter(post => { if (post.type === 'Post' && post.status === 'Published') { postCount++ @@ -236,7 +239,6 @@ async function getPageRecordMapByNotionAPI({ pageId, from }) { }) } - const customNav = getCustomNav({ allPages }) const categories = getAllCategories({ allPages, categoryOptions, sliceCount: BLOG.PREVIEW_CATEGORY_COUNT }) const tags = getAllTags({ allPages, sliceCount: BLOG.PREVIEW_TAG_COUNT, tagOptions }) const latestPosts = getLatestPosts({ allPages, from, latestPostCount: 5 })