Documentation / @agentick/core / parseFrontmatter
Function: parseFrontmatter()
parseFrontmatter(
source):ParsedFrontmatter
Defined in: core/src/skill/frontmatter.ts:36
Split a markdown source into frontmatter object + body. Returns { data: {}, body: source } when no frontmatter is present.
Throws on malformed YAML inside the frontmatter block (delegated to the yaml package). A missing closing delimiter is treated as "no frontmatter" (returns the source unchanged) — that matches Jekyll and gray-matter behavior.
Parameters
source
string