feat: some shit
Some checks failed
Deploy to GitHub Pages / build (push) Failing after 7m4s
Deploy to GitHub Pages / deploy (push) Has been skipped

This commit is contained in:
2024-04-03 18:54:51 +02:00
parent 58b74bb801
commit feb9b21ff8
43 changed files with 60 additions and 71 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);
---