mirror of
https://codeberg.org/JasterV/jaster.xyz.git
synced 2026-04-26 18:10:01 +00:00
Add support for an optional description on posts
This commit is contained in:
parent
24fc48b367
commit
b986ffb4f1
2 changed files with 2 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ const blog = defineCollection({
|
|||
schema: ({ image }) =>
|
||||
z.object({
|
||||
title: z.string(),
|
||||
description: z.string().optional(),
|
||||
pubDate: z.coerce.date(),
|
||||
image: image(),
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ const sortedPosts = posts.sort(
|
|||
{post.data.title}
|
||||
</a>
|
||||
</h2>
|
||||
{post.data.description && <p>{post.data.description}</p>}
|
||||
</article>
|
||||
))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue