From 019913958ad594b1487e064895a27f2222403d73 Mon Sep 17 00:00:00 2001 From: Puria Nafisi Azizi Date: Thu, 9 Nov 2023 01:55:07 +0100 Subject: [PATCH] feat: blog page --- src/components/molecules/BlogCard.astro | 2 +- src/pages/blog/index.astro | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/molecules/BlogCard.astro b/src/components/molecules/BlogCard.astro index 0a7e4da..28bd882 100644 --- a/src/components/molecules/BlogCard.astro +++ b/src/components/molecules/BlogCard.astro @@ -21,6 +21,6 @@ const { author, title, color, href } = Astro.props;

by {author}

- Read on medium + Read it now diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index 96dac47..f5a31f2 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -1,7 +1,7 @@ --- import Layout from '~/layouts/Layout.astro'; -import BlogArticlePreview from '~/components/BlogArticlePreview.astro'; import Parser from 'rss-parser'; +import BlogCard from 'M/BlogCard.astro'; const parser = new Parser(); const medium = await parser.parseURL('https://medium.com/feed/think-do-tank'); @@ -17,6 +17,12 @@ feed.sort((a, b) => new Date(b.isoDate).getTime() - new Date(a.isoDate).getTime( }} >
- {feed.map((f) => )} + { + feed.map((f) => ( + + {f.content} + + )) + }