upgrade to astro 2.0

This commit is contained in:
2023-01-31 21:42:01 -05:00
parent d780cf085d
commit 4a8cb8bb32
30 changed files with 1291 additions and 1206 deletions
+20
View File
@@ -0,0 +1,20 @@
---
import BlogHeader from "@components/BlogHeader.astro";
interface Props {
post: Object;
}
const { post } = Astro.props;
const { data, slug } = post;
const preview = post.body.split("\n")[1];
---
<article class="post-preview">
<div>
<BlogHeader title={post.data.title} date={post.data.pubDate} />
<p>{preview}</p>
<a href={`/posts/${slug}`}>Read More</a>
</div>
</article>