ADR-002-Custom-YAML-Serialization
ADR 002: Custom YAML Frontmatter Generation
Date: 2026-03-31
Status: Accepted
Context:
Obsidian Properties and Dataview require highly specific YAML frontmatter formatting. Standard serialization crates like serde_yaml introduce a runtime dependency for writing and often format arrays or special characters in ways that Obsidian handles poorly.
Decision:
Write a custom generate_frontmatter pipeline instead of relying on generic serializers.
- Auto-injects and prioritizes the
datefield. - Automatically double-quotes values containing YAML-special characters.
- Detects comma-separated string inputs and expands them into YAML lists.
Consequences:
Higher initial maintenance for the formatting logic, but guarantees Obsidian-compatible properties without bloating the binary.