Initial commit from Astro

This commit is contained in:
houston[bot]
2025-01-13 22:12:21 +00:00
committed by Ozzy
commit d0aa75a554
107 changed files with 21987 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
---
import { SITE } from "@config";
import Posts from "@layouts/Posts.astro";
import type { GetStaticPaths } from "astro";
import { getCollection } from "astro:content";
import getSortedPosts from "@utils/getSortedPosts";
export const getStaticPaths = (async ({ paginate }) => {
const posts = await getCollection("blog", ({ data }) => !data.draft);
return paginate(getSortedPosts(posts), { pageSize: SITE.postPerPage });
}) satisfies GetStaticPaths;
const { page } = Astro.props;
---
<Posts {page} />