modified contentParser and index.md file for blog and author, fixed issue #2

This commit is contained in:
somrat sorkar
2023-05-11 13:06:14 +06:00
parent e58aeab8a1
commit ed7a32efb6
8 changed files with 6 additions and 6 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.match(/^(?!_)/));
const removeIndex = allPage.filter((data) => data.id !== "index.md");
const removeDrafts = removeIndex.filter((data) => !data.data.draft);
return removeDrafts;
};