feat: add dnd content collection, remove draft from md schema
This commit is contained in:
parent
45414825a6
commit
d25343aa85
1 changed files with 11 additions and 2 deletions
|
|
@ -10,7 +10,16 @@ const md = defineCollection({
|
|||
date: z.coerce.date().optional(),
|
||||
pinned: z.boolean().optional(),
|
||||
category: z.string().optional(),
|
||||
draft: z.boolean().optional(),
|
||||
related: z.array(z.string()).optional(),
|
||||
})
|
||||
});
|
||||
|
||||
const dnd = defineCollection({
|
||||
loader: glob({ pattern: '**/*.md', base: './src/content/dnd' }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
pinned: z.boolean().optional(),
|
||||
category: z.string().optional(),
|
||||
related: z.array(z.string()).optional(),
|
||||
})
|
||||
});
|
||||
|
|
@ -29,4 +38,4 @@ const bookmarks = defineCollection({
|
|||
})
|
||||
});
|
||||
|
||||
export const collections = { md, bookmarks };
|
||||
export const collections = { md, dnd, bookmarks };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue