feat: add featured metadata
This commit is contained in:
@@ -7,6 +7,7 @@ type FrontMatter = {
|
|||||||
title: string;
|
title: string;
|
||||||
description: string;
|
description: string;
|
||||||
published: string;
|
published: string;
|
||||||
|
isFeatured: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getMdxFile = async (file: string) => {
|
export const getMdxFile = async (file: string) => {
|
||||||
@@ -61,9 +62,7 @@ export const findPosts = async () => {
|
|||||||
|
|
||||||
posts.push({
|
posts.push({
|
||||||
filename: file.replace(".mdx", ""),
|
filename: file.replace(".mdx", ""),
|
||||||
description: frontmatter.description,
|
...frontmatter,
|
||||||
title: frontmatter.title,
|
|
||||||
published: frontmatter.published,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
title: Hello, world
|
title: Hello, world
|
||||||
published: 2023-03-15
|
published: 2023-03-15
|
||||||
description: The hello world post
|
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.
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||||
|
Reference in New Issue
Block a user