Adopt articles for astro

This commit is contained in:
2026-03-07 11:14:50 +03:00
parent 50d032ce62
commit 4b04afb912
13 changed files with 818 additions and 2 deletions

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

@@ -0,0 +1,15 @@
import { defineCollection, z } from 'astro:content';
import { glob } from 'astro/loaders';
const articles = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/articles' }),
schema: z.object({
title: z.string(),
description: z.string().optional(),
keywords: z.array(z.string()).optional(),
tags: z.array(z.string()).optional(),
draft: z.boolean().default(false),
}),
});
export const collections = { articles };