First version with notes
This commit is contained in:
parent
cb91e02327
commit
86aef1608b
45 changed files with 7075 additions and 0 deletions
19
content.config.ts
Normal file
19
content.config.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
// 1. Import utilities from `astro:content`
|
||||
import { defineCollection, z } from "astro:content";
|
||||
|
||||
// 2. Import loader(s)
|
||||
import { glob, file } from "astro/loaders";
|
||||
|
||||
// 3. Define your collection(s)
|
||||
const notes = defineCollection({
|
||||
loader: glob({ pattern: "**/*.md", base: "./src/content/notes" }),
|
||||
schema: z.object({
|
||||
slug: z.string(),
|
||||
title: z.string(),
|
||||
createdAt: z.coerce.date(),
|
||||
updatedAt: z.coerce.date(),
|
||||
}),
|
||||
});
|
||||
|
||||
// 4. Export a single `collections` object to register your collection(s)
|
||||
export const collections = { notes };
|
Loading…
Add table
Add a link
Reference in a new issue