Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissing reports content that does not start with a valid YAML frontmatter block. ErrMissing = errors.New("frontmatter: missing YAML frontmatter") // ErrUnterminated reports content whose opening delimiter has no matching closing delimiter. ErrUnterminated = errors.New("frontmatter: unterminated YAML frontmatter") // ErrBOM reports content that starts with a UTF-8 BOM before the YAML frontmatter delimiter. ErrBOM = errors.New("frontmatter: UTF-8 BOM before YAML frontmatter") )
Functions ¶
func Format ¶
Format serializes metadata and a Markdown body using the canonical frontmatter byte shape.
func RewriteStringField ¶
RewriteStringField updates one top-level scalar without reserializing the surrounding document.
func UnmarshalMetadata ¶
UnmarshalMetadata decodes YAML metadata without exposing the YAML dependency to callers that only need the shared frontmatter parser.
Types ¶
Click to show internal directories.
Click to hide internal directories.