config.ts 536 B

12345678910111213141516171819202122
  1. import { defineCollection, z } from "astro:content"
  2. const docs = defineCollection({
  3. type: "content",
  4. schema: z.object({
  5. title: z.string(),
  6. description: z.string().optional(),
  7. order: z.number().int().nonnegative().optional(),
  8. navTitle: z.string().optional(),
  9. skill: z
  10. .object({
  11. include: z.boolean().default(true),
  12. entry: z.boolean().default(false),
  13. intents: z.array(z.string().trim().min(1)).default([]),
  14. })
  15. .optional(),
  16. }),
  17. })
  18. export const collections = {
  19. docs,
  20. }