diff --git a/components/CommonHead.js b/components/CommonHead.js index 752a65bf..d2b3d1b5 100644 --- a/components/CommonHead.js +++ b/components/CommonHead.js @@ -2,7 +2,7 @@ import { siteConfig } from '@/lib/config' import Head from 'next/head' const CommonHead = ({ meta, children }) => { - let url = siteConfig('PATH')?.length ? `${siteConfig('LINK')}/${siteConfig('SUB_PATH')}` : siteConfig('LINK') + let url = siteConfig('PATH')?.length ? `${siteConfig('LINK')}/${siteConfig('SUB_PATH','')}` : siteConfig('LINK') let image if (meta) { url = `${url}/${meta.slug}` diff --git a/themes/commerce/components/ArticleRecommend.js b/themes/commerce/components/ArticleRecommend.js index 0feff96d..b26aace1 100644 --- a/themes/commerce/components/ArticleRecommend.js +++ b/themes/commerce/components/ArticleRecommend.js @@ -38,7 +38,7 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) { ( diff --git a/themes/commerce/components/BlogPostArchive.js b/themes/commerce/components/BlogPostArchive.js index 860e8c6a..8c3fbaaf 100644 --- a/themes/commerce/components/BlogPostArchive.js +++ b/themes/commerce/components/BlogPostArchive.js @@ -30,7 +30,7 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => { {post.date?.start_date}{' '}   diff --git a/themes/commerce/components/BlogPostCardInfo.js b/themes/commerce/components/BlogPostCardInfo.js index 23dd2ad2..fb84cce9 100644 --- a/themes/commerce/components/BlogPostCardInfo.js +++ b/themes/commerce/components/BlogPostCardInfo.js @@ -15,7 +15,7 @@ export const BlogPostCardInfo = ({ post, showPreview, showPageCover, showSummary
{/* 标题 */} diff --git a/themes/commerce/components/Footer.js b/themes/commerce/components/Footer.js index 7a0f59b8..da6a7baf 100644 --- a/themes/commerce/components/Footer.js +++ b/themes/commerce/components/Footer.js @@ -57,7 +57,7 @@ const Footer = (props) => {
- {siteConfig('COMMERCE_TEXT_FOOTER_LINKS') &&
+ {JSON.parse(siteConfig('COMMERCE_TEXT_FOOTER_LINKS', true)) &&
{siteConfig('COMMERCE_TEXT_FOOTER_TITLE', 'Contact US')}
diff --git a/themes/commerce/components/LatestPostsGroup.js b/themes/commerce/components/LatestPostsGroup.js index 7562bce2..3c4fadbc 100644 --- a/themes/commerce/components/LatestPostsGroup.js +++ b/themes/commerce/components/LatestPostsGroup.js @@ -28,7 +28,7 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => {
{latestPosts.map(post => { - const selected = currentPath === `${siteConfig('SUB_PATH')}/${post.slug}` + const selected = currentPath === `${siteConfig('SUB_PATH', '')}/${post.slug}` const headerImage = post?.pageCoverThumbnail ? post.pageCoverThumbnail : siteInfo?.pageCover @@ -36,7 +36,7 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => { ( diff --git a/themes/commerce/components/PostHeader.js b/themes/commerce/components/PostHeader.js index be727a94..e73314f1 100644 --- a/themes/commerce/components/PostHeader.js +++ b/themes/commerce/components/PostHeader.js @@ -7,28 +7,28 @@ export default function PostHeader({ post, siteInfo }) { return <> } const headerImage = post?.pageCover ? post.pageCover : siteInfo?.pageCover - + const title = post?.title return (