Merge pull request #569 from tangly1024/develop

导航菜单修复
This commit is contained in:
tangly1024
2022-12-09 17:29:25 +08:00
committed by GitHub

View File

@@ -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 })