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 13e6ef41_baa4_e4ac_ac3b_fa6e69c0e8c0["content.config.ts"] 199cb0c0_7c92_5375_9195_0f59939b49ed["astro:content"] 13e6ef41_baa4_e4ac_ac3b_fa6e69c0e8c0 --> 199cb0c0_7c92_5375_9195_0f59939b49ed 82c23b20_84b3_3038_cd30_be2e0f2ef654["zod"] 13e6ef41_baa4_e4ac_ac3b_fa6e69c0e8c0 --> 82c23b20_84b3_3038_cd30_be2e0f2ef654 57096fb8_3fb5_1319_b2b6_ba8488b380f0["loaders"] 13e6ef41_baa4_e4ac_ac3b_fa6e69c0e8c0 --> 57096fb8_3fb5_1319_b2b6_ba8488b380f0 style 13e6ef41_baa4_e4ac_ac3b_fa6e69c0e8c0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { defineCollection } from 'astro:content';
import { z } from 'astro/zod';
import { glob } from 'astro/loaders';
const docs = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/docs' }),
schema: z.object({
title: z.string(),
}),
});
const i18n = defineCollection({
loader: glob({ pattern: '**/*.{json,yaml,yml}', base: './src/content/i18n' }),
schema: z.object({
homepage: z.object({
greeting: z.string(),
preamble: z.string(),
}),
}),
});
const authors = defineCollection({
loader: glob({
pattern: '**/*.{json,yaml,yml}',
base: './src/content/authors',
// Old data collection behavior
generateId: ({ entry }) => entry.split('.')[0],
}),
});
export const collections = { docs, i18n, authors };
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/data-collections/src/content.config.ts (directory: packages/astro/test/fixtures/data-collections/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free