log101-dot-dev/src/content/config.ts

20 lines
488 B
TypeScript
Raw Normal View History

import { z, defineCollection } from "astro:content";
2024-05-06 19:36:07 +00:00
export const CATEGORIES = ["fikir", "teknik", "edebiyat", "ansiklopedi"];
2024-05-07 16:35:30 +00:00
2024-05-06 19:36:07 +00:00
const blogCollection = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
2024-06-25 17:45:41 +00:00
tags: z.optional(z.array(z.string())),
2024-05-06 19:36:07 +00:00
summary: z.string(),
date: z.date(),
category: z.enum(["fikir", "teknik", "edebiyat", "ansiklopedi"]),
subcategory: z.string(),
}),
});
export const collections = {
2024-05-06 19:36:07 +00:00
blog: blogCollection,
};