Skip to main content

Module front_matter

Module front_matter 

Source
Expand description

YAML front matter parsing, writing, and metadata utilities for artifacts. YAML front matter parsing, writing, and metadata utilities.

Ito module and change markdown artifacts support an optional YAML front matter header delimited by --- lines at the beginning of the file.

Front matter stores stable metadata (timestamps, identifiers, integrity checksums) that is independent of filesystem attributes and survives copies across hosts.

Structs§

FrontMatter
Parsed YAML front matter metadata for an Ito artifact.
IntegrityMetadata
Integrity metadata for checksum-based corruption detection.
ParsedDocument
Result of parsing front matter from a markdown document.

Functions§

body_sha256
Compute the SHA-256 hex digest of a body string.
parse
Parse a markdown document that may start with YAML front matter.
touch
Update the updated_at timestamp in front matter to the current time.
update_integrity
Update the integrity checksum in front matter to match the given body.
validate_id
Validate that a front matter identifier matches the expected value.
validate_integrity
Validate that a front matter checksum matches the body content.
write
Serialize front matter and body back into a markdown document with YAML front matter.