From 81e018fe845015838c213e3b7390b7fb2cdae663 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Wed, 7 Jun 2023 15:51:07 +0800 Subject: [PATCH] fix-build --- lib/notion/getAllCategories.js | 2 +- lib/notion/getAllTags.js | 2 +- themes/hexo/components/ArticleRecommend.js | 2 +- themes/hexo/components/BlogPostArchive.js | 2 +- themes/hexo/components/LatestPostsGroup.js | 2 +- themes/matery/components/ArticleRecommend.js | 2 +- themes/matery/components/LatestPostsGroup.js | 2 +- themes/next/components/BlogPostArchive.js | 2 +- themes/next/components/LatestPostsGroup.js | 2 +- themes/next/components/RecommendPosts.js | 4 ++-- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/notion/getAllCategories.js b/lib/notion/getAllCategories.js index fd26b9b1..7cfd4588 100644 --- a/lib/notion/getAllCategories.js +++ b/lib/notion/getAllCategories.js @@ -19,7 +19,7 @@ export function getAllCategories({ allPages, categoryOptions, sliceCount = 0 }) return [] } // 计数 - let categories = allposts?.map(p => p.category) + let categories = allPosts?.map(p => p.category) categories = [...categories.flat()] const categoryObj = {} categories.forEach(category => { diff --git a/lib/notion/getAllTags.js b/lib/notion/getAllTags.js index 94e21214..968b8ca3 100644 --- a/lib/notion/getAllTags.js +++ b/lib/notion/getAllTags.js @@ -14,7 +14,7 @@ export function getAllTags({ allPages, sliceCount = 0, tagOptions }) { return [] } // 计数 - let tags = allposts?.map(p => p.tags) + let tags = allPosts?.map(p => p.tags) tags = [...tags.flat()] const tagObj = {} tags.forEach(tag => { diff --git a/themes/hexo/components/ArticleRecommend.js b/themes/hexo/components/ArticleRecommend.js index 35e6164d..9b5a5500 100644 --- a/themes/hexo/components/ArticleRecommend.js +++ b/themes/hexo/components/ArticleRecommend.js @@ -28,7 +28,7 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) {
- {recommendposts?.map(post => { + {recommendPosts.map(post => { const headerImage = post?.page_cover ? `url("${post.page_cover}")` : `url("${siteInfo?.pageCover}")` diff --git a/themes/hexo/components/BlogPostArchive.js b/themes/hexo/components/BlogPostArchive.js index 4a746bde..f90f4c03 100644 --- a/themes/hexo/components/BlogPostArchive.js +++ b/themes/hexo/components/BlogPostArchive.js @@ -42,7 +42,7 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => { ))}
- ); + ) } } diff --git a/themes/hexo/components/LatestPostsGroup.js b/themes/hexo/components/LatestPostsGroup.js index 66f8b862..b7f7e558 100644 --- a/themes/hexo/components/LatestPostsGroup.js +++ b/themes/hexo/components/LatestPostsGroup.js @@ -26,7 +26,7 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => { {locale.COMMON.LATEST_POSTS} - {latestposts?.map(post => { + {latestPosts.map(post => { const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` const headerImage = post?.page_cover ? post.page_cover : siteInfo?.pageCover diff --git a/themes/matery/components/ArticleRecommend.js b/themes/matery/components/ArticleRecommend.js index ed01e521..67620599 100644 --- a/themes/matery/components/ArticleRecommend.js +++ b/themes/matery/components/ArticleRecommend.js @@ -28,7 +28,7 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) {
- {recommendposts?.map(post => { + {recommendPosts.map(post => { const headerImage = post?.page_cover ? `url("${post.page_cover}")` : `url("${siteInfo?.pageCover}")` diff --git a/themes/matery/components/LatestPostsGroup.js b/themes/matery/components/LatestPostsGroup.js index ae0d1450..cfb44018 100644 --- a/themes/matery/components/LatestPostsGroup.js +++ b/themes/matery/components/LatestPostsGroup.js @@ -25,7 +25,7 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => { {locale.COMMON.LATEST_POSTS}
- {latestposts?.map(post => { + {latestPosts.map(post => { const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` const headerImage = post?.page_cover ? `url("${post.page_cover}")` diff --git a/themes/next/components/BlogPostArchive.js b/themes/next/components/BlogPostArchive.js index df189138..a5a1ac6f 100644 --- a/themes/next/components/BlogPostArchive.js +++ b/themes/next/components/BlogPostArchive.js @@ -42,7 +42,7 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => { ))} - ); + ) } } diff --git a/themes/next/components/LatestPostsGroup.js b/themes/next/components/LatestPostsGroup.js index 01018fa5..a12f55b5 100644 --- a/themes/next/components/LatestPostsGroup.js +++ b/themes/next/components/LatestPostsGroup.js @@ -25,7 +25,7 @@ const LatestPostsGroup = ({ latestPosts }) => { {locale.COMMON.LATEST_POSTS} - {latestposts?.map(post => { + {latestPosts.map(post => { const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` return ( ( {
{locale.COMMON.RELATE_POSTS} :
- ); + ) } export default RecommendPosts