feat: some shit

This commit is contained in:
2024-04-03 18:54:51 +02:00
parent 1b86c44244
commit aea14aa471
43 changed files with 70 additions and 81 deletions

View File

@@ -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);
---