content.config.ts — astro Source File
Architecture documentation for content.config.ts, a typescript file in the astro codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 417a2168_7db3_8ba7_a451_05ede087524a["content.config.ts"] ed9863d0_4ae5_5d4f_fcca_1356d24455ac["./loaders/post-loader.js"] 417a2168_7db3_8ba7_a451_05ede087524a --> ed9863d0_4ae5_5d4f_fcca_1356d24455ac 48f80d01_e646_3924_78f6_a9d836644746["astro:content"] 417a2168_7db3_8ba7_a451_05ede087524a --> 48f80d01_e646_3924_78f6_a9d836644746 d47373dc_6761_5858_3027_a4a6472dd795["loaders"] 417a2168_7db3_8ba7_a451_05ede087524a --> d47373dc_6761_5858_3027_a4a6472dd795 146dc5fe_1437_ad00_4647_01bc965224c2["promises"] 417a2168_7db3_8ba7_a451_05ede087524a --> 146dc5fe_1437_ad00_4647_01bc965224c2 0f49b6f2_8b44_baf8_7812_a8fa2dd0ca84["zod"] 417a2168_7db3_8ba7_a451_05ede087524a --> 0f49b6f2_8b44_baf8_7812_a8fa2dd0ca84 style 417a2168_7db3_8ba7_a451_05ede087524a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { defineCollection, reference } from 'astro:content';
import { file, glob } from 'astro/loaders';
import { loader } from './loaders/post-loader.js';
import { readFile } from 'fs/promises';
import { z } from 'astro/zod';
const blog = defineCollection({
loader: loader({ url: 'https://jsonplaceholder.typicode.com/posts' }),
});
const dogs = defineCollection({
loader: file('src/data/dogs.json'),
schema: z.object({
breed: z.string(),
id: z.string(),
size: z.string(),
origin: z.string(),
lifespan: z.string(),
temperament: z.array(z.string()),
}),
});
const rodents = defineCollection({
loader: () => ({
capybara: {
name: 'Capybara',
scientificName: 'Hydrochoerus hydrochaeris',
lifespan: 10,
weight: 50000,
diet: ['grass', 'aquatic plants', 'bark', 'fruits'],
nocturnal: false,
},
hamster: {
name: 'Golden Hamster',
scientificName: 'Mesocricetus auratus',
lifespan: 2,
weight: 120,
diet: ['seeds', 'nuts', 'insects'],
nocturnal: true,
},
rat: {
name: 'Brown Rat',
scientificName: 'Rattus norvegicus',
lifespan: 2,
weight: 350,
diet: ['grains', 'fruits', 'vegetables', 'meat'],
nocturnal: true,
},
mouse: {
name: 'House Mouse',
scientificName: 'Mus musculus',
lifespan: 1,
weight: 20,
diet: ['seeds', 'grains', 'fruits'],
nocturnal: true,
},
guineaPig: {
name: 'Guinea Pig',
scientificName: 'Cavia porcellus',
lifespan: 5,
// ... (217 more lines)
Domain
Subdomains
Dependencies
- ./loaders/post-loader.js
- astro:content
- loaders
- promises
- 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 ContentCollections domain, DataLoaders subdomain.
What functions are defined in content.config.ts?
content.config.ts defines 5 function(s): cats.loader, images.loader, images.schema, rodents.loader, spacecraft.schema.
What does content.config.ts depend on?
content.config.ts imports 5 module(s): ./loaders/post-loader.js, astro:content, loaders, promises, zod.
Where is content.config.ts in the architecture?
content.config.ts is located at packages/astro/e2e/fixtures/cloudflare/src/content.config.ts (domain: ContentCollections, subdomain: DataLoaders, directory: packages/astro/e2e/fixtures/cloudflare/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free