frontmatter

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL