diff --git a/utils/content.ts b/utils/content.ts index 5ee7007..98fa9b9 100644 --- a/utils/content.ts +++ b/utils/content.ts @@ -144,9 +144,9 @@ export const getContentData = async ( const match = filenames.filter((filename) => { const filePath = path.join(contentTypeDirectory, filename); const fileContent = fs.readFileSync(filePath, 'utf-8'); + const matterResult = matter(fileContent); const { slug } = matterResult.data; - return slug === id; });