Documentation
¶
Overview ¶
Package frontmatter transforms journal YAML frontmatter into Obsidian-compatible format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractStringSlice ¶
ExtractStringSlice extracts a []string from a map value that may be []any (as returned by yaml.Unmarshal into map[string]any).
Parameters:
- m: Source map
- key: Key to extract
Returns:
- []string: Extracted strings, or nil if key is missing/empty
func TransformFrontmatter ¶
TransformFrontmatter converts journal frontmatter to Obsidian format.
Changes applied:
- topics -> tags (Obsidian-recognized key)
- aliases added from title (makes entries findable by name)
- source_file added with the relative path to the source entry
- technologies preserved as custom property
Parameters:
- content: Full Markdown content with YAML frontmatter
- sourcePath: Relative path to the source journal file
Returns:
- string: Content with transformed frontmatter
Types ¶
type ObsidianFrontmatter ¶
type ObsidianFrontmatter struct {
Title string `yaml:"title"`
Date string `yaml:"date"`
Type string `yaml:"type,omitempty"`
Outcome string `yaml:"outcome,omitempty"`
Tags []string `yaml:"tags,omitempty"`
Technologies []string `yaml:"technologies,omitempty"`
KeyFiles []string `yaml:"key_files,omitempty"`
Aliases []string `yaml:"aliases,omitempty"`
SourceFile string `yaml:"source_file,omitempty"`
}
ObsidianFrontmatter represents the YAML frontmatter for Obsidian vault entries. Extends JournalFrontmatter with Obsidian-specific fields.
Click to show internal directories.
Click to hide internal directories.