mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-11 18:56:06 +09:00
modified contentParser and index.md file for blog and author, fixed issue #2
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.match(/^(?!_)/));
|
||||
const removeIndex = allPage.filter((data) => data.id !== "index.md");
|
||||
const removeDrafts = removeIndex.filter((data) => !data.data.draft);
|
||||
return removeDrafts;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user