feat: change all Link component to SmartLink

Close #3512
This commit is contained in:
anime
2025-07-24 15:06:39 +08:00
parent fc4817e669
commit ba951cd2aa
338 changed files with 1381 additions and 1381 deletions

View File

@@ -1,6 +1,6 @@
import { useGlobal } from '@/lib/global'
import { formatDateFmt } from '@/lib/utils/formatDate'
import Link from 'next/link'
import SmartLink from '@/components/SmartLink'
/**
* 文章详情的元信息
* 标题、作者、分类、标签、创建日期等等。
@@ -14,25 +14,25 @@ export const PostMeta = props => {
<div>
{post?.type !== 'Page' && (
<>
<Link
<SmartLink
href={`/category/${post?.category}`}
passHref
className='cursor-pointer text-md mr-2 hover:text-black dark:hover:text-white border-b dark:border-gray-500 border-dashed'>
<i className='mr-1 fas fa-folder-open' />
{post?.category}
</Link>
</SmartLink>
<span className='mr-2'>|</span>
</>
)}
{post?.type !== 'Page' && (
<>
<Link
<SmartLink
href={`/archive#${formatDateFmt(post?.publishDate, 'yyyy-MM')}`}
passHref
className='pl-1 mr-2 cursor-pointer hover:text-gray-700 dark:hover:text-gray-200 border-b dark:border-gray-500 border-dashed'>
{post?.publishDay}
</Link>
</SmartLink>
<span className='mr-2'>|</span>
<span className='mx-2 text-gray-400 dark:text-gray-500'>
{locale.COMMON.LAST_EDITED_TIME}: {post?.lastEditedDay}