fix(theme): 修复 文章 设置 article 为 false 时未被正确过滤的问题

This commit is contained in:
pengzhanbo 2022-05-10 21:44:25 +08:00
parent 1d63a9c4f4
commit edf54568ea

View File

@ -12,7 +12,11 @@ export const usePostAllIndex = (): PostIndexRef => postIndex
// 在首页文章列表的,默认排除掉 note中的文章除非显示声明 article
export const usePostIndex = (): PostIndexRef => {
const postList = postIndex.value.filter((post) => {
return !post.isNote || post.article === true
if (post.isNote) {
return post.article === true
} else {
return post.article !== false
}
})
return ref(postList)
}