aboutsummaryrefslogtreecommitdiff
path: root/apps/website/src/content/config.ts
diff options
context:
space:
mode:
authorPauline <git@ethanlibs.co>2024-01-22 04:27:34 +0100
committerPauline <git@ethanlibs.co>2024-01-22 04:27:48 +0100
commitf0e73cf90005709e20b2f16f63d67d6802af3332 (patch)
tree1fb33d1bf14ada662a9cbdea1728c3f031c06ff0 /apps/website/src/content/config.ts
parente1f6521a78f5c2a873199fd8cded0bc58ac3aa6e (diff)
downloadNexus-f0e73cf90005709e20b2f16f63d67d6802af3332.tar.gz
Nexus-f0e73cf90005709e20b2f16f63d67d6802af3332.tar.bz2
Nexus-f0e73cf90005709e20b2f16f63d67d6802af3332.zip
feat(layout): add seo metadata to all pages
Diffstat (limited to 'apps/website/src/content/config.ts')
-rw-r--r--apps/website/src/content/config.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/website/src/content/config.ts b/apps/website/src/content/config.ts
index 8d68c0e..6f6cde9 100644
--- a/apps/website/src/content/config.ts
+++ b/apps/website/src/content/config.ts
@@ -1,12 +1,15 @@
-import { defineCollection, z } from 'astro:content';
+import { defineCollection } from 'astro:content';
+import { z } from 'zod';
const blog = defineCollection({
schema: z.object({
title: z.string(),
description: z.string(),
- pubDate: z.coerce.date(),
- updatedDate: z.coerce.date().optional(),
- heroImage: z.string().optional(),
+ publishDate: z.string().or(z.date()).transform(val => new Date(val)),
+ updatedDate: z.string().or(z.date()).transform(val => new Date(val)).optional(),
+ socialImage: z.string().optional(),
+ coverImage: z.string().optional(),
+ lang: z.enum(['en']).default('en'),
}),
});