Skip to content

Commit 9eb0620

Browse files
committed
feat(Schedule): スキーマを作成
1 parent 0af0129 commit 9eb0620

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

2025/src/content/config.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { glob } from "astro/loaders";
2+
import { defineCollection, z } from "astro:content";
3+
4+
const schedules = defineCollection({
5+
loader: glob({
6+
pattern: "*.toml",
7+
base: "./src/content/schedules",
8+
}),
9+
schema: z.object({
10+
no: z.number(),
11+
type: z.enum(["keynote", "break", "talk", "lt", "other"]),
12+
speaker: z.string(),
13+
image: z.string(),
14+
title: z.string(),
15+
abstract: z.string(),
16+
bio: z.string(),
17+
startTime: z.string(),
18+
endTime: z.string(),
19+
duration: z.string(),
20+
language: z.enum(["Japanese", "English"]),
21+
github: z.string().optional(),
22+
x: z.string().optional(),
23+
bluesky: z.string().optional(),
24+
titleLink: z.string().optional(),
25+
slideLink: z.string().optional(),
26+
}),
27+
});
28+
29+
// コレクションのエクスポート
30+
export const collections = {
31+
schedules,
32+
};

0 commit comments

Comments
 (0)