mirror of
https://github.com/KazooTTT/kazoottt-blog-v2.git
synced 2025-06-24 11:11:29 +08:00
feat: 新增置顶文章
This commit is contained in:
@ -8,6 +8,12 @@ export async function getAllPosts(): Promise<CollectionEntry<"post">[]> {
|
||||
});
|
||||
}
|
||||
|
||||
export async function getAllFixedToTopPosts(): Promise<CollectionEntry<"post">[]> {
|
||||
return await getCollection("post", ({ data }) => {
|
||||
return import.meta.env.PROD ? data.fixedToTop : false;
|
||||
});
|
||||
}
|
||||
|
||||
export async function getAllCollectionPosts() {
|
||||
const posts = await getAllPosts();
|
||||
const notes = await getCollection("note");
|
||||
|
Reference in New Issue
Block a user