--- import SocialList from "@/components/SocialList.astro"; import PostPreview from "@/components/blog/PostPreview.astro"; import { getAllFixedToTopPosts, getAllNotes, getAllPosts } from "@/data/post"; import PageLayout from "@/layouts/Base.astro"; import { collectionDateSort } from "@/utils/date"; import SelfIntro from "@/pages/self-intro.astro"; import ContentFooter from "@/components/ContentFooter.astro"; import GiscusComment from "@/components/componentsBefore/GiscusComment"; import Tools from "@/components/tools/index.astro"; // Posts const MAX_POSTS = 10; const allPosts = await getAllPosts(); const allPostsByDate = allPosts.sort(collectionDateSort).slice(0, MAX_POSTS); // Fixed to top Posts const allFixedToTopPosts = await getAllFixedToTopPosts(); const allFixedToTopPostsByDate = allFixedToTopPosts.sort(collectionDateSort).slice(0, MAX_POSTS); // Notes const MAX_NOTES = 6; const allNotes = await getAllNotes(); const latestNotes = allNotes.sort(collectionDateSort).slice(0, MAX_NOTES); ---

About

Total time coded since Nov 4 2017
{ allFixedToTopPostsByDate.length > 0 && (

置顶文章

) }

Posts

查看更多 →