markdownContentEntryType.getRenderFunction() — astro Function Reference
Architecture documentation for the markdownContentEntryType.getRenderFunction() function in content-entry-type.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 937d813c_3cb5_e565_d94c_88b1937a937a["markdownContentEntryType.getRenderFunction()"] deec1f28_4d3d_27c1_da09_7a6a276ef96d["content-entry-type.ts"] 937d813c_3cb5_e565_d94c_88b1937a937a -->|defined in| deec1f28_4d3d_27c1_da09_7a6a276ef96d style 937d813c_3cb5_e565_d94c_88b1937a937a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/vite-plugin-markdown/content-entry-type.ts lines 20–39
async getRenderFunction(config) {
const processor = await createMarkdownProcessor({
image: config.image,
...config.markdown,
});
return async function renderToString(entry) {
// Process markdown even if it's empty as remark/rehype plugins may add content or frontmatter dynamically
const result = await processor.render(entry.body ?? '', {
frontmatter: entry.data,
fileURL: entry.filePath ? pathToFileURL(entry.filePath) : undefined,
});
return {
html: result.code,
metadata: {
...result.metadata,
imagePaths: result.metadata.localImagePaths.concat(result.metadata.remoteImagePaths),
},
};
};
},
Domain
Subdomains
Source
Frequently Asked Questions
What does markdownContentEntryType.getRenderFunction() do?
markdownContentEntryType.getRenderFunction() is a function in the astro codebase, defined in packages/astro/src/vite-plugin-markdown/content-entry-type.ts.
Where is markdownContentEntryType.getRenderFunction() defined?
markdownContentEntryType.getRenderFunction() is defined in packages/astro/src/vite-plugin-markdown/content-entry-type.ts at line 20.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free