Cyril Šebek
7a71a66dc7
- Enable server output mode - Pre-render for (almost) every .astro file - Fixed custom middleware
40 lines
837 B
Plaintext
40 lines
837 B
Plaintext
---
|
|
export const prerender = true;
|
|
import {
|
|
Card,
|
|
CardContent,
|
|
CardDescription,
|
|
CardHeader,
|
|
CardTitle,
|
|
} from "./ui/card";
|
|
|
|
const { post } = Astro.props;
|
|
---
|
|
|
|
<div>
|
|
<a href={`${Astro.url.origin}/${Astro.currentLocale}/blog/${post.blog_slug}`}>
|
|
<Card>
|
|
<CardHeader>
|
|
<img
|
|
src={post.data.image.url}
|
|
alt={post.data.image.alt}
|
|
class="rounded-md"
|
|
|
|
/>
|
|
<span class="py-2"></span>
|
|
<CardTitle>{post.data.title}</CardTitle>
|
|
<CardDescription>
|
|
<p>
|
|
{post.data.author} • {
|
|
post.data.publishDate.toLocaleString(Astro.currentLocale)
|
|
}
|
|
</p>
|
|
</CardDescription>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<p>{post.data.description}</p>
|
|
</CardContent>
|
|
</Card>
|
|
</a>
|
|
</div>
|