mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-19 22:53:36 +09:00
initialize project
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
---
|
||||
import { getCollection } from "astro:content";
|
||||
|
||||
export const getSinglePage = async (collection: any) => {
|
||||
const allPage = await getCollection(collection);
|
||||
const removeIndex = allPage.filter((data) => data.id.match(/^(?!_)/));
|
||||
const removeDrafts = removeIndex.filter((data) => !data.data.draft);
|
||||
return removeDrafts;
|
||||
};
|
||||
---
|
||||
Reference in New Issue
Block a user