Skip to content

Commit fc07b8e

Browse files
committed
Setup notes collection
1 parent d58519f commit fc07b8e

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
dist
3+
.astro

src/content/config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { defineCollection, z } from "astro:content";
2+
3+
export const collections = {
4+
notes: defineCollection({
5+
type: "content",
6+
schema: z
7+
.object({
8+
title: z.string(),
9+
dateCreated: z.date(),
10+
dateUpdated: z.date()
11+
})
12+
.required()
13+
.strict()
14+
})
15+
};

src/env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
/// <reference path="../.astro/types.d.ts" />
12
/// <reference types="astro/client-image" />

0 commit comments

Comments
 (0)