Migrate to astro v5 beta: first round
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { z, defineCollection } from 'astro:content';
|
||||
import { glob } from 'astro/loaders';
|
||||
|
||||
const metadataDefinition = () =>
|
||||
z
|
||||
@@ -46,6 +47,7 @@ const metadataDefinition = () =>
|
||||
.optional();
|
||||
|
||||
const postCollection = defineCollection({
|
||||
loader: glob({ pattern: ['*.md', '*.mdx'], base: 'src/data/post' }),
|
||||
schema: z.object({
|
||||
publishDate: z.date().optional(),
|
||||
updateDate: z.date().optional(),
|
||||
|
Reference in New Issue
Block a user