Skip to content

obsidian/frontmatter

This module provides utility functions for processing and managing YAML front matter in Obsidian notes.

InterfaceDescription
ObsidianFrontmatterA front matter of an Obsidian file.
ObsidianPublishFrontmatterA front matter for publishing in Obsidian.
RemoveEmptyFrontmatterValuesParamsParameters for removeEmptyFrontmatterValues.
FunctionDescription
parseFrontmatterParses the front matter of a given content string.
removeEmptyFrontmatterValuesRemoves the empty values from a front matter object, at any nesting depth. By default only empty strings are removed — both as property values and as array items. null, undefined, empty arrays and empty objects are kept unless the corresponding option is enabled. The object is modified in place, so the function can be called straight from a processFrontmatter() callback.
setFrontmatterSets the front matter of a given content string.
TypeDescription
CombinedFrontmatterA combined front matter of a document. It is a union of custom front matter, Obsidian front matter, and additional properties.