Home / File/ content.config.ts — astro Source File

content.config.ts — astro Source File

Architecture documentation for content.config.ts, a typescript file in the astro codebase. 4 imports, 0 dependents.

File typescript CoreAstro RoutingSystem 4 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  212db3a7_d0cf_6098_c86c_e274c2bec978["content.config.ts"]
  f16d8c76_2866_6150_bd14_0347b59abfe9["astro"]
  212db3a7_d0cf_6098_c86c_e274c2bec978 --> f16d8c76_2866_6150_bd14_0347b59abfe9
  48f80d01_e646_3924_78f6_a9d836644746["astro:content"]
  212db3a7_d0cf_6098_c86c_e274c2bec978 --> 48f80d01_e646_3924_78f6_a9d836644746
  0f49b6f2_8b44_baf8_7812_a8fa2dd0ca84["zod"]
  212db3a7_d0cf_6098_c86c_e274c2bec978 --> 0f49b6f2_8b44_baf8_7812_a8fa2dd0ca84
  d47373dc_6761_5858_3027_a4a6472dd795["loaders"]
  212db3a7_d0cf_6098_c86c_e274c2bec978 --> d47373dc_6761_5858_3027_a4a6472dd795
  style 212db3a7_d0cf_6098_c86c_e274c2bec978 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { ImageMetadata } from 'astro';
import { defineCollection } from 'astro:content';
import { z } from 'astro/zod';
import { glob } from 'astro/loaders';

const blog = defineCollection({
	loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/blog' }),
	schema: ({ image }) =>
		z.object({
			image: z
				.string()
				.regex(/^https:.*/)
				.transform(
					(url) =>
						({
							src: url,
							width: 1200,
							height: 630,
							format: 'jpeg',
						}) satisfies ImageMetadata
				)
				.or(image()),
		}),
});

export const collections = { blog };

Domain

Subdomains

Functions

Dependencies

  • astro
  • astro:content
  • loaders
  • zod

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 CoreAstro domain, RoutingSystem subdomain.
What functions are defined in content.config.ts?
content.config.ts defines 1 function(s): blog.schema.
What does content.config.ts depend on?
content.config.ts imports 4 module(s): astro, astro:content, loaders, zod.
Where is content.config.ts in the architecture?
content.config.ts is located at packages/integrations/cloudflare/test/fixtures/compile-image-service/src/content.config.ts (domain: CoreAstro, subdomain: RoutingSystem, directory: packages/integrations/cloudflare/test/fixtures/compile-image-service/src).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free