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

@@ -9,6 +9,7 @@ import CONFIG from '../config'
import NotionPage from '@/components/NotionPage'
import NotionIcon from '@/components/NotionIcon'
import TwikooCommentCount from '@/components/TwikooCommentCount'
import { formatDateFmt } from '@/lib/formatDate'
const BlogPostCard = ({ post, showSummary }) => {
const { locale } = useGlobal()
@@ -57,7 +58,7 @@ const BlogPostCard = ({ post, showSummary }) => {
</>
)}
<Link
href={`/archive#${post?.publishTime?.substr(0, 7)}`}
href={`/archive#${formatDateFmt(post?.publishDate, 'yyyy-MM')}`}
passHref
className="hover:text-blue-500 dark:hover:text-blue-400 font-light hover:underline cursor-pointer text-sm leading-4 mr-3">
{post.date?.start_date}