getContentEntryModule() — astro Function Reference
Architecture documentation for the getContentEntryModule() function in vite-plugin-content-imports.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD faee72c2_19cd_965a_76d9_c12bcc678122["getContentEntryModule()"] 157f6669_1b64_2b6d_ca39_b0f784c87ad2["vite-plugin-content-imports.ts"] faee72c2_19cd_965a_76d9_c12bcc678122 -->|defined in| 157f6669_1b64_2b6d_ca39_b0f784c87ad2 06cd4177_9728_08c0_fa43_2385e28cbaf4["astroContentImportPlugin()"] 06cd4177_9728_08c0_fa43_2385e28cbaf4 -->|calls| faee72c2_19cd_965a_76d9_c12bcc678122 d4749634_d021_a687_4265_4885c1ed7b3f["getEntryModuleBaseInfo()"] faee72c2_19cd_965a_76d9_c12bcc678122 -->|calls| d4749634_d021_a687_4265_4885c1ed7b3f style faee72c2_19cd_965a_76d9_c12bcc678122 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/content/vite-plugin-content-imports.ts lines 244–289
async function getContentEntryModule(
params: GetEntryModuleParams<ContentEntryType>,
): Promise<ContentEntryModule> {
const { fileId, contentDir, pluginContext } = params;
const { collectionConfig, entryConfig, entry, rawContents, collection } =
await getEntryModuleBaseInfo(params);
const {
rawData,
data: unvalidatedData,
body,
slug: frontmatterSlug,
} = await entryConfig.getEntryInfo({
fileUrl: pathToFileURL(fileId),
contents: rawContents,
});
const _internal = { filePath: fileId, rawData };
const { id, slug: generatedSlug } = getContentEntryIdAndSlug({ entry, contentDir, collection });
const slug = parseEntrySlug({
id,
collection,
generatedSlug,
frontmatterSlug,
});
const data = collectionConfig
? await getEntryData(
{ id, collection, _internal, unvalidatedData },
collectionConfig,
params.shouldEmitFile,
pluginContext,
)
: unvalidatedData;
const contentEntryModule: ContentEntryModule = {
id,
slug,
collection,
data,
body,
_internal,
};
return contentEntryModule;
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does getContentEntryModule() do?
getContentEntryModule() is a function in the astro codebase, defined in packages/astro/src/content/vite-plugin-content-imports.ts.
Where is getContentEntryModule() defined?
getContentEntryModule() is defined in packages/astro/src/content/vite-plugin-content-imports.ts at line 244.
What does getContentEntryModule() call?
getContentEntryModule() calls 1 function(s): getEntryModuleBaseInfo.
What calls getContentEntryModule()?
getContentEntryModule() is called by 1 function(s): astroContentImportPlugin.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free