Documentation
¶
Overview ¶
Package frontmatter parses YAML frontmatter from markdown files, shared by skills and prompt templates. Port of Pi's utils/frontmatter.ts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
Map is a parsed frontmatter block. Absent frontmatter yields an empty Map rather than an error — a plain markdown file is valid input.
func Parse ¶
Parse splits a document into frontmatter and body.
Frontmatter must open with "---" on the first line and close with a line starting "\n---"; anything else is treated as an all-body document (frontmatter.ts:10-26). Line endings are normalized to \n first, so CRLF files parse identically.
Click to show internal directories.
Click to hide internal directories.