heo 添加最后更新日期,修复归档日期bug

This commit is contained in:
tangly1024.com
2023-07-27 18:32:21 +08:00
parent a43445377e
commit 2a83af39a9
12 changed files with 28 additions and 12 deletions

View File

@@ -1,5 +1,6 @@
import Link from 'next/link'
import { useGlobal } from '@/lib/global'
import { formatDateFmt } from '@/lib/formatDate'
export const ArticleInfo = (props) => {
const { post } = props
@@ -24,7 +25,7 @@ export const ArticleInfo = (props) => {
{post?.type !== 'Page' && (<>
<Link
href={`/archive#${post?.publishTime?.substr(0, 7)}`}
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">