Documentation
¶
Overview ¶
Package frontmatter provides lightweight YAML frontmatter parsing for markdown files. This avoids heavy dependencies on flow/plan packages for simple metadata extraction.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocMetadata ¶
type DocMetadata struct {
ID string `json:"id"`
Title string `json:"title"`
Status string `json:"status"`
Type string `json:"type"`
StartedAt time.Time `json:"start_time"`
UpdatedAt time.Time `json:"updated_at"`
Worktree string `json:"worktree"`
}
DocMetadata represents common fields found in markdown frontmatter.
func Parse ¶
func Parse(r io.Reader) (DocMetadata, error)
Parse extracts metadata from YAML frontmatter in a markdown reader. It stops reading after the closing '---' separator.
func ParseString ¶
func ParseString(content string) (DocMetadata, error)
ParseString extracts metadata from a string containing markdown with frontmatter.
Click to show internal directories.
Click to hide internal directories.