content.config.ts — astro Source File
Architecture documentation for content.config.ts, a typescript file in the astro codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 77fb7445_eba0_566f_bfea_2a7008a5435d["content.config.ts"] 199cb0c0_7c92_5375_9195_0f59939b49ed["astro:content"] 77fb7445_eba0_566f_bfea_2a7008a5435d --> 199cb0c0_7c92_5375_9195_0f59939b49ed 82c23b20_84b3_3038_cd30_be2e0f2ef654["zod"] 77fb7445_eba0_566f_bfea_2a7008a5435d --> 82c23b20_84b3_3038_cd30_be2e0f2ef654 57096fb8_3fb5_1319_b2b6_ba8488b380f0["loaders"] 77fb7445_eba0_566f_bfea_2a7008a5435d --> 57096fb8_3fb5_1319_b2b6_ba8488b380f0 style 77fb7445_eba0_566f_bfea_2a7008a5435d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// 1. Import utilities from `astro:content`
import { defineCollection } from 'astro:content';
import { z } from 'astro/zod';
import { glob } from "astro/loaders";
// 2. Define a `type` and `schema` for each collection
const blogCollection = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/blog' }),
schema: z.object({
title: z.string(),
date: z.date(),
}),
});
// 3. Export a single `collections` object to register your collection(s)
export const collections = {
blog: blogCollection,
};
Dependencies
- astro:content
- loaders
- zod
Source
Frequently Asked Questions
What does content.config.ts do?
content.config.ts is a source file in the astro codebase, written in typescript.
What does content.config.ts depend on?
content.config.ts imports 3 module(s): astro:content, loaders, zod.
Where is content.config.ts in the architecture?
content.config.ts is located at packages/astro/test/fixtures/content-collections-mutation/src/content.config.ts (directory: packages/astro/test/fixtures/content-collections-mutation/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free