fix: Address dependency issues within KendoReact components.

- add gray-matter to reduce duplicated meta data for posts
    - rename files in data/BlogPosts/ to address limitations in path handling
This commit is contained in:
2025-09-25 20:10:16 -05:00
parent f94d30e5ef
commit f22d9f08bf
10 changed files with 603 additions and 444 deletions

View File

@@ -1,4 +1,25 @@
// /data/blog-post-data.js
import matter from 'gray-matter';
const modules = import.meta.glob('./BlogPosts/*.md', { query: '?raw', import: 'default' });
export async function loadPosts() {
const posts = [];
for (const path in modules) {
const fileContent = await modules[path]();
const { data } = matter(fileContent);
posts.push({
...data,
path,
});
}
return posts;
}
/* // /data/blog-post-data.js
export const blogPosts = [
{
title: "#0 - Setting Up Camp",
@@ -87,4 +108,4 @@ export const blogPosts = [
tags: null,
published: false
}
];
]; */