feat: nested dir support

This commit is contained in:
bholmesdev 2022-10-24 11:34:43 -04:00
parent 9854fdec24
commit 813fd1e557

View file

@ -183,7 +183,7 @@ async function getEntriesByCollection(
collectionPath: string,
{ contentDir }: Pick<Dirs, 'contentDir'>
): Promise<Entry[]> {
const files = await glob(`${collectionPath}/*.{md,mdx}`);
const files = await glob(`${collectionPath}/**/*.{md,mdx}`);
return Promise.all(
files.map(async (filePath) => {
const entryKey = path.relative(collectionPath, filePath);