Fix content loading

This commit is contained in:
Hazem Krimi
2022-02-13 19:30:46 +01:00
parent 763db6f5c1
commit 8fdc27152a
4 changed files with 50 additions and 24 deletions
+2
View File
@@ -61,5 +61,7 @@ export const getBlogPostdata = async (slug: string) => {
const fullPath = path.join(blogPostsDirectory, `${slug}.mdx`);
const postContent = fs.readFileSync(fullPath, 'utf8');
if (!postContent) return undefined;
return postContent;
};