Home / Function/ getCollectionName() — astro Function Reference

getCollectionName() — astro Function Reference

Architecture documentation for the getCollectionName() function in frontmatterHolders.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  3bc53284_8ff2_c415_b4d2_8a6f79d11dde["getCollectionName()"]
  f60cb650_8357_a1b3_0ec1_4fa2349de8ca["frontmatterHolders.ts"]
  3bc53284_8ff2_c415_b4d2_8a6f79d11dde -->|defined in| f60cb650_8357_a1b3_0ec1_4fa2349de8ca
  544bcbe3_d83f_098b_80b4_40ceea84f0c9["getFrontmatterLanguagePlugin()"]
  544bcbe3_d83f_098b_80b4_40ceea84f0c9 -->|calls| 3bc53284_8ff2_c415_b4d2_8a6f79d11dde
  style 3bc53284_8ff2_c415_b4d2_8a6f79d11dde fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/language-tools/language-server/src/core/frontmatterHolders.ts lines 33–39

function getCollectionName(collectionConfig: CollectionConfig, fileURI: string) {
	for (const collection of collectionConfig.configs) {
		if (collection.config.entries[fileURI]) {
			return collection.config.entries[fileURI];
		}
	}
}

Domain

Subdomains

Frequently Asked Questions

What does getCollectionName() do?
getCollectionName() is a function in the astro codebase, defined in packages/language-tools/language-server/src/core/frontmatterHolders.ts.
Where is getCollectionName() defined?
getCollectionName() is defined in packages/language-tools/language-server/src/core/frontmatterHolders.ts at line 33.
What calls getCollectionName()?
getCollectionName() is called by 1 function(s): getFrontmatterLanguagePlugin.

Analyze Your Own Codebase

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

Try Supermodel Free