aboutsummaryrefslogtreecommitdiff
path: root/examples/docs/src/content/config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'examples/docs/src/content/config.ts')
-rw-r--r--examples/docs/src/content/config.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/docs/src/content/config.ts b/examples/docs/src/content/config.ts
new file mode 100644
index 000000000..2780035b1
--- /dev/null
+++ b/examples/docs/src/content/config.ts
@@ -0,0 +1,20 @@
+import { defineCollection, z } from 'astro:content';
+import { SITE } from '../consts';
+
+const docs = defineCollection({
+ schema: z.object({
+ title: z.string().default(SITE.title),
+ description: z.string().default(SITE.description),
+ lang: z.literal('en-us').default(SITE.defaultLanguage),
+ dir: z.union([z.literal('ltr'), z.literal('rtl')]).default('ltr'),
+ image: z
+ .object({
+ src: z.string(),
+ alt: z.string(),
+ })
+ .optional(),
+ ogLocale: z.string().optional(),
+ }),
+});
+
+export const collections = { docs };