feat: add featured metadata

This commit is contained in:
Andrea 2024-09-24 09:14:34 +02:00
parent 687e02f38c
commit 6d72ac0a56
No known key found for this signature in database
GPG Key ID: 4594610B9C8F91C5
2 changed files with 3 additions and 3 deletions

View File

@ -7,6 +7,7 @@ type FrontMatter = {
title: string;
description: string;
published: string;
isFeatured: boolean;
};
export const getMdxFile = async (file: string) => {
@ -61,9 +62,7 @@ export const findPosts = async () => {
posts.push({
filename: file.replace(".mdx", ""),
description: frontmatter.description,
title: frontmatter.title,
published: frontmatter.published,
...frontmatter,
});
}

View File

@ -2,6 +2,7 @@
title: Hello, world
published: 2023-03-15
description: The hello world post
isFeatured: false
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.