✨ 主页添加絮语卡片 归档部分初见雏形
This commit is contained in:
+19
-15
@@ -1,25 +1,29 @@
|
||||
import { defineContentConfig, defineCollection, z } from '@nuxt/content';
|
||||
|
||||
const schema = z.object({
|
||||
id: z.string(),
|
||||
title: z.string(),
|
||||
description: z.string().optional(),
|
||||
category: z.string().optional(),
|
||||
created_at: z.string().datetime(),
|
||||
published_at: z.string().datetime().optional(),
|
||||
draft: z.boolean().default(false),
|
||||
updated_at: z.array(z.string().datetime()).default([]),
|
||||
tags: z.array(z.string()).default([]),
|
||||
type: z.enum(['article', 'rambling']).default('article'),
|
||||
tech_stack: z.array(z.string()).default([]),
|
||||
tech_stack_percent: z.array(z.number()).default([]),
|
||||
tech_stack_icon_names: z.array(z.string()).default([]),
|
||||
tech_stack_theme_colors: z.array(z.string()).default([]),
|
||||
rawbody: z.string(),
|
||||
});
|
||||
|
||||
export default defineContentConfig({
|
||||
collections: {
|
||||
content: defineCollection({
|
||||
type: 'page',
|
||||
source: '**/*.md',
|
||||
schema: z.object({
|
||||
id: z.string(),
|
||||
title: z.string(),
|
||||
description: z.string().optional(),
|
||||
created_at: z.string().datetime(),
|
||||
published_at: z.string().datetime().optional(),
|
||||
draft: z.boolean().default(false),
|
||||
updated_at: z.array(z.string().datetime()).default([]),
|
||||
tags: z.array(z.string()).default([]),
|
||||
tech_stack: z.array(z.string()).default([]),
|
||||
tech_stack_percent: z.array(z.number()).default([]),
|
||||
tech_stack_icon_names: z.array(z.string()).default([]),
|
||||
tech_stack_theme_colors: z.array(z.string()).default([]),
|
||||
rawbody: z.string(),
|
||||
}),
|
||||
schema: schema,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user