mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-13 03:36:18 +09:00
rename index file for collection and added accessiblity for some components
This commit is contained in:
@@ -3,7 +3,7 @@ import { getCollection } from "astro:content";
|
||||
|
||||
export const getSinglePage = async (collection: any) => {
|
||||
const allPage = await getCollection(collection);
|
||||
const removeIndex = allPage.filter((data) => data.id !== "index.md");
|
||||
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