feat: some shit
This commit is contained in:
@ -12,21 +12,7 @@ const locale = getLocale(Astro.url);
|
||||
|
||||
const posts = filterCollection(pages, locale);
|
||||
|
||||
const featuredPosts = await Promise.all(
|
||||
posts.slice(0, 3).map(async (post) => {
|
||||
if (!post.data.headerImg) {
|
||||
return post;
|
||||
}
|
||||
const { default: image } = await import(
|
||||
`../../content/blog/${post.slug.split("/")[0]}/${post.data.headerImg}`
|
||||
);
|
||||
return {
|
||||
...post,
|
||||
image,
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
||||
const featuredPosts = posts.slice(0, 3);
|
||||
const otherPosts = posts.slice(3);
|
||||
---
|
||||
|
||||
|
Reference in New Issue
Block a user