fuksawa post card

This commit is contained in:
tangly1024.com
2023-06-27 15:14:40 +08:00
parent 562cb6137d
commit 2a48a3dabf
8 changed files with 116 additions and 83 deletions

View File

@@ -179,7 +179,7 @@ export function getNavPages({ allPages }) {
const allNavPages = allPages.filter(post => {
return post && post?.slug && (!post?.slug?.startsWith('http')) && post?.type === 'Post' && post?.status === 'Published'
})
const result = allNavPages.map(item => ({ id: item.id, title: item.title, category: item.category || null, tags: item.tags || null, summary: item.summary || null, slug: item.slug }))
const result = allNavPages.map(item => ({ id: item.id, title: item.title || null, category: item.category || null, tags: item.tags || null, summary: item.summary || null, slug: item.slug }))
const groupedArray = result.reduce((groups, item) => {
const categoryName = item.category ? item.category.join('/') : '' // 将category转换为字符串