This commit is contained in:
tangly1024.com
2023-12-27 18:46:02 +08:00
parent b4ba4d121a
commit bc467da99f
2 changed files with 4 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ const BlogCard = ({ index, post, showSummary, siteInfo }) => {
post.pageCoverThumbnail = siteInfo?.pageCover
}
const showPageCover = siteConfig('FUKASAWA_POST_LIST_COVER', null, CONFIG) && post?.pageCoverThumbnail
const SUB_PATH = siteConfig('SUB_PATH', '')
return (
<div
@@ -25,7 +26,7 @@ const BlogCard = ({ index, post, showSummary, siteInfo }) => {
{/* 封面图 */}
{showPageCover && (
<div className="flex-grow mb-3 w-full duration-200 cursor-pointer transform overflow-hidden">
<Link href={`${siteConfig('SUB_PATH', '')}/${post.slug}`} passHref legacyBehavior>
<Link href={`${SUB_PATH}/${post.slug}`} passHref legacyBehavior>
<LazyImage
src={post?.pageCoverThumbnail}
alt={post?.title || siteConfig('TITLE')}
@@ -37,7 +38,7 @@ const BlogCard = ({ index, post, showSummary, siteInfo }) => {
{/* 文字部分 */}
<div className="flex flex-col w-full">
<Link passHref href={`${siteConfig('SUB_PATH', '')}/${post.slug}`}
<Link passHref href={`${SUB_PATH}/${post.slug}`}
className={`break-words cursor-pointer font-bold hover:underline text-xl ${showPreview ? 'justify-center' : 'justify-start'} leading-tight text-gray-700 dark:text-gray-100 hover:text-blue-500 dark:hover:text-blue-400`}
>
{post.title}

View File

@@ -1,5 +1,5 @@
const CONFIG = {
FUKASAWA_MAILCHIMP_FORM: true, // 邮件订阅表单
FUKASAWA_MAILCHIMP_FORM: false, // 邮件订阅表单
FUKASAWA_POST_LIST_COVER: true, // 文章列表显示图片封面
FUKASAWA_POST_LIST_COVER_FORCE: false, // 即使没有封面也将站点背景图设置为封面