summaryrefslogtreecommitdiff
path: root/src/content/config.ts
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2025-05-23 15:07:50 +0200
committerYuval Adam <_@yuv.al>2025-05-23 15:07:50 +0200
commitf32aa30f2f0722fb659a22ddc57cdf3bd79a4ab5 (patch)
treeaf0031bb0ac0ab7a6c2c4b9d70303b45283ca7c0 /src/content/config.ts
parent85bde2d3d69a9f976d3e8ecc9343d1b52a0ec29f (diff)
Add blog pages, content and standardlayout
Diffstat (limited to 'src/content/config.ts')
-rw-r--r--src/content/config.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/content/config.ts b/src/content/config.ts
new file mode 100644
index 0000000..43a44ad
--- /dev/null
+++ b/src/content/config.ts
@@ -0,0 +1,19 @@
+import { defineCollection, z } from 'astro:content';
+
+// Define the blog collection schema
+const blogCollection = defineCollection({
+ type: 'content',
+ schema: z.object({
+ title: z.string(),
+ description: z.string(),
+ pubDate: z.date(),
+ image: z.string().optional(),
+ author: z.string().default('Anonymous'),
+ tags: z.array(z.string()).default([]),
+ }),
+});
+
+// Export the collections
+export const collections = {
+ 'blog': blogCollection,
+};