mirror of
https://github.com/KazooTTT/kazoottt-blog.git
synced 2025-06-22 10:11:30 +08:00
fix: ts error
This commit is contained in:
@ -22,7 +22,9 @@ const post = defineCollection({
|
|||||||
tags: z.union([z.array(z.string()), z.null()]).default([]).transform(removeDupsAndLowerCase),
|
tags: z.union([z.array(z.string()), z.null()]).default([]).transform(removeDupsAndLowerCase),
|
||||||
ogImage: z.string().optional(),
|
ogImage: z.string().optional(),
|
||||||
category: z.string().optional().nullable(),
|
category: z.string().optional().nullable(),
|
||||||
finished: z.boolean().default(false)
|
finished: z.boolean().default(false),
|
||||||
|
pinned: z.boolean().default(false),
|
||||||
|
projectUrl: z.string().optional()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ const mdProjects = allPosts
|
|||||||
.map(post => ({
|
.map(post => ({
|
||||||
title: post.data.title,
|
title: post.data.title,
|
||||||
description: post.data.description || '',
|
description: post.data.description || '',
|
||||||
url: post.data.projectUrl || `/posts/${post.slug}`,
|
url: post.data.projectUrl ? post.data.projectUrl : `/posts/${post.slug}`,
|
||||||
imagePath: post.data.coverImage,
|
imagePath: post.data.coverImage,
|
||||||
altText: post.data.title,
|
altText: post.data.title,
|
||||||
isExternal: !!post.data.projectUrl
|
isExternal: !!post.data.projectUrl
|
||||||
|
Reference in New Issue
Block a user