chore: dasdsad

This commit is contained in:
2025-02-06 02:09:29 +06:00
parent 6b150fe4c4
commit f297c5b18f
21 changed files with 1588 additions and 645 deletions

18
src/content.config.ts Normal file
View File

@@ -0,0 +1,18 @@
import { glob } from "astro/loaders";
import { defineCollection, z } from "astro:content";
const blog = defineCollection({
// Load Markdown and MDX files in the `src/content/blog/` directory.
loader: glob({ base: "./src/content/blog", pattern: "**/*.{md,mdx}" }),
// Type-check frontmatter using a schema
schema: z.object({
title: z.string(),
description: z.string(),
// Transform string to Date object
pubDate: z.coerce.date(),
updatedDate: z.coerce.date().optional(),
heroImage: z.string().optional(),
}),
});
export const collections = { blog };