Bluewaterblog/blog/src/pages/index.astro
2026-06-27 14:48:09 +02:00

20 lines
538 B
Text

---
import Main from "../layouts/Main.astro";
import PostPreviewLarge from "../components/PostPreviewLarge.astro";
import PostGrid from "../components/PostGrid.astro";
const allPosts: Array<any> = Object.values(
import.meta.glob("./posts/*.md", { eager: true })
);
const posts = allPosts.slice(0, allPosts.length - 1)
const mostRecentPost = allPosts.at(allPosts.length - 1);
---
<Main title="Startseite">
<PostPreviewLarge
url={mostRecentPost.url}
post={mostRecentPost.frontmatter}
/>
<PostGrid posts={posts} />
</Main>