mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-02 02:10:27 +00:00
Fix content loading
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -61,5 +61,7 @@ export const getPortfolioProjectdata = async (slug: string) => {
|
||||
const fullPath = path.join(portfolioProjects, `${slug}.mdx`);
|
||||
const postContent = fs.readFileSync(fullPath, 'utf8');
|
||||
|
||||
if (!postContent) return undefined;
|
||||
|
||||
return postContent;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user