collectionName() — astro Function Reference
Architecture documentation for the collectionName() function in content-layer.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 4c30ad96_2f14_71f2_0135_fc4828f9cfb4["collectionName()"] 4a6efe25_e6e4_25af_3955_aede0d8f5983["ContentLayer"] 4c30ad96_2f14_71f2_0135_fc4828f9cfb4 -->|defined in| 4a6efe25_e6e4_25af_3955_aede0d8f5983 style 4c30ad96_2f14_71f2_0135_fc4828f9cfb4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/content/content-layer.ts lines 118–145
async #getLoaderContext({
collectionName,
loaderName = 'content',
parseData,
refreshContextData,
}: {
collectionName: string;
loaderName: string;
parseData: LoaderContext['parseData'];
refreshContextData?: Record<string, unknown>;
}): Promise<LoaderContext> {
return {
collection: collectionName,
store: this.#store.scopedStore(collectionName),
meta: this.#store.metaStore(collectionName),
logger: this.#logger.forkIntegrationLogger(loaderName),
config: this.#settings.config,
parseData,
renderMarkdown: this.#processMarkdown.bind(this),
generateDigest: await this.#getGenerateDigest(),
watcher: this.#watcher,
refreshContextData,
entryTypes: getEntryConfigByExtMap([
...this.#settings.contentEntryTypes,
...this.#settings.dataEntryTypes,
] as Array<ContentEntryType>),
};
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does collectionName() do?
collectionName() is a function in the astro codebase, defined in packages/astro/src/content/content-layer.ts.
Where is collectionName() defined?
collectionName() is defined in packages/astro/src/content/content-layer.ts at line 118.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free