From 2c2c1e23479ec199d33e71f9e0417604cb47a7f2 Mon Sep 17 00:00:00 2001 From: Korbs Date: Tue, 10 Dec 2024 15:24:22 -0500 Subject: [PATCH] Add new component for posts --- src/pages/blog/index.astro | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index 63b1883..043e27a 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -5,12 +5,35 @@ import Default from "@layouts/Default.astro"; // Components import Posts from "@components/blog/posts.astro"; import Heading from "@components/Heading.astro"; +import {BlogPost} from "@sudovanilla/pandora" + +// Get Posts +import { ghostClient } from "@library/ghost"; +const posts = await ghostClient.posts + .browse({ + limit: "all", + }) + .catch(() => {null}) --- -
Loading posts...
+ +
+ { + posts.map((post) => ( + + )) + } +