From 6d72ac0a560cf84dfc470a4658fac2bc74aca4c4 Mon Sep 17 00:00:00 2001 From: Andrea Date: Tue, 24 Sep 2024 09:14:34 +0200 Subject: [PATCH] feat: add featured metadata --- app/utils/posts.server.ts | 5 ++--- posts/helloworld.mdx | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/utils/posts.server.ts b/app/utils/posts.server.ts index 8fbc516..70ef9f8 100644 --- a/app/utils/posts.server.ts +++ b/app/utils/posts.server.ts @@ -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, }); } diff --git a/posts/helloworld.mdx b/posts/helloworld.mdx index e605379..119e04f 100644 --- a/posts/helloworld.mdx +++ b/posts/helloworld.mdx @@ -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.