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 bdce0b69_15fc_037c_b5db_04900ef459bd["content.config.ts"] 48f80d01_e646_3924_78f6_a9d836644746["astro:content"] bdce0b69_15fc_037c_b5db_04900ef459bd --> 48f80d01_e646_3924_78f6_a9d836644746 0f49b6f2_8b44_baf8_7812_a8fa2dd0ca84["zod"] bdce0b69_15fc_037c_b5db_04900ef459bd --> 0f49b6f2_8b44_baf8_7812_a8fa2dd0ca84 d47373dc_6761_5858_3027_a4a6472dd795["loaders"] bdce0b69_15fc_037c_b5db_04900ef459bd --> d47373dc_6761_5858_3027_a4a6472dd795 style bdce0b69_15fc_037c_b5db_04900ef459bd 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 func = defineCollection({
loader: glob({ pattern: '**/*.{json,yaml,yml}', base: './src/content/func' }),
schema: () => z.object({
homepage: z.object({
greeting: z.string(),
preamble: z.string(),
})
}),
});
const image = defineCollection({
loader: glob({ pattern: '**/*.{json,yaml,yml}', base: './src/content/image' }),
schema: ({ image }) => z.object({
homepage: z.object({
greeting: z.string(),
preamble: z.string(),
image: image(),
})
}),
});
const authors = defineCollection({
loader: glob({ pattern: '**/*.{json,yaml,yml}', base: './src/content/authors' }),
});
export const collections = { docs, func, image, i18n, authors };
Domain
Subdomains
Functions
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. It belongs to the IntegrationAdapters domain, SsrAdapters subdomain.
What functions are defined in content.config.ts?
content.config.ts defines 2 function(s): func.schema, image.schema.
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-schema/src/content.config.ts (domain: IntegrationAdapters, subdomain: SsrAdapters, directory: packages/astro/test/fixtures/data-collections-schema/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free