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