staticql
Version:
Type-safe query engine for static content including Markdown, YAML, JSON, and more.
12 lines (11 loc) • 463 B
TypeScript
/**
* parseMarkdown: Parses a Markdown string with optional YAML frontmatter.
*
* Extracts frontmatter (delimited by `---`) as metadata, and returns both attributes and content body.
*
* @param rawContent - The raw Markdown string to parse.
* @returns An object containing parsed frontmatter fields and the remaining Markdown body as `content`.
*/
export declare function parseFrontMatter({ rawContent }: {
rawContent: string;
}): Record<string, any>;