mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
refactor: update imports and frontmatter types
This commit is contained in:
@@ -5,8 +5,8 @@ const getSortedPosts = (posts: CollectionEntry<"blog">[]) =>
|
||||
.filter(({ data }) => !data.draft)
|
||||
.sort(
|
||||
(a, b) =>
|
||||
Math.floor(new Date(b.data.publishDatetime).getTime() / 1000) -
|
||||
Math.floor(new Date(a.data.publishDatetime).getTime() / 1000)
|
||||
Math.floor(new Date(b.data.pubDatetime).getTime() / 1000) -
|
||||
Math.floor(new Date(a.data.pubDatetime).getTime() / 1000)
|
||||
);
|
||||
|
||||
export default getSortedPosts;
|
||||
|
||||
Reference in New Issue
Block a user