diff --git a/src/pages/posts/index.astro b/src/pages/posts/index.astro index e46eaa0..7bd7a8f 100644 --- a/src/pages/posts/index.astro +++ b/src/pages/posts/index.astro @@ -3,9 +3,10 @@ import { SITE } from "src/config"; import Posts from "@layouts/Posts.astro"; import getSortedPosts from "@utils/getSortedPosts"; import getPageNumbers from "@utils/getPageNumbers"; -import type { Frontmatter } from "src/types"; -const posts = await Astro.glob("../../contents/**/*.md"); +import { getCollection } from "astro:content"; + +const posts = await getCollection("blog"); const sortedPosts = getSortedPosts(posts);