content.config.ts — astro Source File
Architecture documentation for content.config.ts, a typescript file in the astro codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 827521ed_ff30_2590_dc55_2526ca807403["content.config.ts"] 6c8227a8_2793_a09b_cc19_0b8c1a7bcf27["./loaders/post-loader.js"] 827521ed_ff30_2590_dc55_2526ca807403 --> 6c8227a8_2793_a09b_cc19_0b8c1a7bcf27 48f80d01_e646_3924_78f6_a9d836644746["astro:content"] 827521ed_ff30_2590_dc55_2526ca807403 --> 48f80d01_e646_3924_78f6_a9d836644746 d47373dc_6761_5858_3027_a4a6472dd795["loaders"] 827521ed_ff30_2590_dc55_2526ca807403 --> d47373dc_6761_5858_3027_a4a6472dd795 146dc5fe_1437_ad00_4647_01bc965224c2["promises"] 827521ed_ff30_2590_dc55_2526ca807403 --> 146dc5fe_1437_ad00_4647_01bc965224c2 style 827521ed_ff30_2590_dc55_2526ca807403 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { defineCollection, z, reference } from 'astro:content';
import { file, glob } from 'astro/loaders';
import { loader } from './loaders/post-loader.js';
import { readFile } from 'fs/promises';
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,
weight: 1000,
// ... (216 more lines)
Domain
Subdomains
Dependencies
- ./loaders/post-loader.js
- astro:content
- loaders
- promises
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 CoreAstro domain, RoutingSystem 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 4 module(s): ./loaders/post-loader.js, astro:content, loaders, promises.
Where is content.config.ts in the architecture?
content.config.ts is located at packages/integrations/cloudflare/test/fixtures/vite-plugin/src/content.config.ts (domain: CoreAstro, subdomain: RoutingSystem, directory: packages/integrations/cloudflare/test/fixtures/vite-plugin/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free