rename index file for collection and added accessiblity for some components

This commit is contained in:
somrat sorkar
2023-05-15 12:19:03 +06:00
parent 60c98d631b
commit cc0e52e48b
11 changed files with 53 additions and 32 deletions
+1 -1
View File
@@ -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;
};