Upgrade dependencies.
This commit is contained in:
36
content.config.ts
Normal file
36
content.config.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { z, defineCollection } from 'astro:content';
|
||||
import { glob } from 'astro/loaders';
|
||||
|
||||
const blogCollection = defineCollection({
|
||||
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/content/blog" }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
category: z.string(),
|
||||
lastUpdate: z.string()
|
||||
}),
|
||||
});
|
||||
const noteCollection = defineCollection({
|
||||
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/content/note" }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
category: z.string(),
|
||||
lastUpdate: z.string()
|
||||
}),
|
||||
});
|
||||
const translationCollection = defineCollection({
|
||||
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/content/translation" }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
category: z.string(),
|
||||
lastUpdate: z.string()
|
||||
}),
|
||||
});
|
||||
|
||||
export const collections = {
|
||||
'blog': blogCollection,
|
||||
'note': noteCollection,
|
||||
'translation': translationCollection,
|
||||
};
|
||||
Reference in New Issue
Block a user