Function: parseMarkdownFrontmatter()
ts
function parseMarkdownFrontmatter(rawMarkdown): ParsedMarkdownDocument;Defined in: markdown/src/parser/internal/parse-markdown-frontmatter.ts:21
Parses leading YAML frontmatter and body content from a raw Markdown string via mdast and yaml.
Uses mdast-util-from-markdown with micromark-extension-frontmatter and mdast-util-frontmatter to isolate the leading yaml AST node and parses its contents via yaml.parse.
Parameters
| Parameter | Type | Description |
|---|---|---|
rawMarkdown | string | Raw UTF-8 Markdown document text. |
Returns
Frozen ParsedMarkdownDocument containing frontmatter and body.