upgrade to astro 2.0
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user