feat: Rename image and data files

- Add PostCard component
    - Add WysiwygEditor component
    - Use 'front-matter' to parse front matter in markdown files for metadata instead of using redundant data objects
This commit is contained in:
2025-09-27 11:48:32 -05:00
parent f22d9f08bf
commit dceef32ba2
20 changed files with 500 additions and 52 deletions

View File

@@ -1,4 +1,4 @@
import matter from 'gray-matter';
import fm from 'front-matter';
const modules = import.meta.glob('./BlogPosts/*.md', { query: '?raw', import: 'default' });
@@ -7,10 +7,10 @@ export async function loadPosts() {
for (const path in modules) {
const fileContent = await modules[path]();
const { data } = matter(fileContent);
const { attributes } = fm(fileContent);
posts.push({
...data,
...attributes,
path,
});
}