From 5542c18af3cebe63bcbd5fd6d54625af3ca4f2fe Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 25 Jan 2024 15:22:02 +0000 Subject: Now displaying blog posts --- src/pages/blog/index.astro | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/pages') diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index 556be15..1ebc9e9 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -1,8 +1,19 @@ --- import Page from "../../layouts/Page.astro"; +import { getCollection } from "astro:content"; + +const allBlogPosts = await getCollection('blog'); ---
+ {allBlogPosts.map((post) => ( +
+

{post.data.title}

+ {post.data.date} +

{post.data.description}

+ Read more +
+ ))
-- cgit v1.2.3