mirror of
https://github.com/KazooTTT/kazoottt-blog.git
synced 2025-06-23 02:31:33 +08:00
feat: add category page
This commit is contained in:
@ -12,7 +12,7 @@ const post = defineCollection({
|
||||
schema: ({ image }) =>
|
||||
z.object({
|
||||
title: z.string().max(60),
|
||||
description: z.string().min(50).max(160),
|
||||
description: z.string(),
|
||||
publishDate: z
|
||||
.string()
|
||||
.or(z.date())
|
||||
@ -29,7 +29,8 @@ const post = defineCollection({
|
||||
.optional(),
|
||||
draft: z.boolean().default(false),
|
||||
tags: z.array(z.string()).default([]).transform(removeDupsAndLowerCase),
|
||||
ogImage: z.string().optional()
|
||||
ogImage: z.string().optional(),
|
||||
category: z.string().optional(),
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -7,4 +7,5 @@ coverImage:
|
||||
src: "./cover.png"
|
||||
alt: "Astro build wallpaper"
|
||||
tags: ["test", "image"]
|
||||
category: c1
|
||||
---
|
||||
|
@ -4,6 +4,7 @@ description: "This post is for testing the draft post functionality"
|
||||
publishDate: "10 Sept 2023"
|
||||
tags: ["test"]
|
||||
draft: true
|
||||
category: c2
|
||||
---
|
||||
|
||||
If this is working correctly, this post should only be accessible in a dev environment, as well as any tags that are unique to this post.
|
||||
|
@ -3,6 +3,7 @@ title: "Lorem ipsum dolor sit, amet consectetur adipisicing elit. Id"
|
||||
description: "This post is purely for testing if the css is correct for the title on the page"
|
||||
publishDate: "01 Feb 2023"
|
||||
tags: ["test"]
|
||||
category: c3
|
||||
---
|
||||
|
||||
## Testing the title tag
|
||||
|
Reference in New Issue
Block a user