hexo 默认封面图开关

This commit is contained in:
tangly1024.com
2023-02-06 11:03:29 +08:00
parent 352ece25ab
commit 679ffbce74
5 changed files with 11 additions and 8 deletions

View File

@@ -5,8 +5,11 @@ import TagItemMini from './TagItemMini'
import CONFIG_HEXO from '../config_hexo'
import NotionPage from '@/components/NotionPage'
const BlogPostCard = ({ post, showSummary, index }) => {
const BlogPostCard = ({ post, showSummary, index, siteInfo }) => {
const showPreview = CONFIG_HEXO.POST_LIST_PREVIEW && post.blockMap
if (post && !post.page_cover && CONFIG_HEXO.POST_LIST_COVER_DEFAULT) {
post.page_cover = siteInfo?.pageCover
}
const showPageCover = CONFIG_HEXO.POST_LIST_COVER && post?.page_cover
return (
<div