14 lines
359 B
TypeScript
14 lines
359 B
TypeScript
import { defineCollection, z } from "astro:content";
|
|
import { glob } from "astro/loaders";
|
|
|
|
const docs = defineCollection({
|
|
loader: glob({ base: "src/content/docs", pattern: "**/*.{md,mdx}" }),
|
|
schema: z.object({
|
|
title: z.string(),
|
|
section: z.string().optional(),
|
|
order: z.number().default(99),
|
|
}),
|
|
});
|
|
|
|
export const collections = { docs };
|