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

@@ -4,6 +4,7 @@ import { useGlobal } from '@/lib/global'
import BLOG from '@/blog.config'
import NotionIcon from '@/components/NotionIcon'
import LazyImage from '@/components/LazyImage'
import { formatDateFmt } from '@/lib/formatDate'
export default function PostHeader({ post, siteInfo }) {
const { locale } = useGlobal()
@@ -42,7 +43,7 @@ export default function PostHeader({ post, siteInfo }) {
{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:underline">