feat: add front-matter variable category

This commit is contained in:
saicaca
2023-11-07 12:35:52 +08:00
parent 2b000f7e55
commit b171ad463e
10 changed files with 22 additions and 8 deletions
+1
View File
@@ -7,6 +7,7 @@ const blogCollection = defineCollection({
description: z.string().optional(),
image: z.string().optional(),
tags: z.array(z.string()).optional(),
category: z.string().optional(),
})
})
export const collections = {
+1
View File
@@ -4,6 +4,7 @@ published: 2023-09-01
description: 'How to set a cover image using the cover attribute.'
image: 'https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=2048/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg'
tags: ["Fuwari", "Blogging", "Customization"]
category:
---
## Set the cover image using the `image` attribute
+1 -1
View File
@@ -4,7 +4,7 @@ published: 2023-10-01
description: A simple example of a Markdown blog post.
image:
tags: [Markdown, Blogging, Demo]
categories: [Example]
category: Example
---
An h1 header
+1 -1
View File
@@ -4,7 +4,7 @@ published: 2022-08-01
description: This post demonstrates how to include embedded video in a blog post.
image:
tags: [Example, Video]
categories: []
category: Example
---
Just copy the embed code from YouTube or other platforms, and paste it in the markdown file.