content() — astro Function Reference
Architecture documentation for the content() function in content-layer.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 8a3d5ffd_859d_59fa_f1d4_cd4724647bb7["content()"] 4a6efe25_e6e4_25af_3955_aede0d8f5983["ContentLayer"] 8a3d5ffd_859d_59fa_f1d4_cd4724647bb7 -->|defined in| 4a6efe25_e6e4_25af_3955_aede0d8f5983 style 8a3d5ffd_859d_59fa_f1d4_cd4724647bb7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/content/content-layer.ts lines 147–161
async #processMarkdown(
content: string,
options?: RenderMarkdownOptions,
): Promise<RenderedContent> {
this.#markdownProcessor ??= await createMarkdownProcessor(this.#settings.config.markdown);
const { frontmatter, content: body } = parseFrontmatter(content);
const { code, metadata } = await this.#markdownProcessor.render(body, {
frontmatter,
fileURL: options?.fileURL,
});
return {
html: code,
metadata,
};
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does content() do?
content() is a function in the astro codebase, defined in packages/astro/src/content/content-layer.ts.
Where is content() defined?
content() is defined in packages/astro/src/content/content-layer.ts at line 147.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free