Documentation
¶
Index ¶
- func Build(fm *Frontmatter) string
- func BuildContent(fm *Frontmatter, bodyContent string) string
- func ExtractPathTags(noteType string) []string
- func FormatTimestamp(t time.Time) string
- func MergeTags(sources ...[]string) []string
- func ParseTimestamp(s string) (time.Time, error)
- type Frontmatter
- type RemoteMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build(fm *Frontmatter) string
Build creates the YAML frontmatter string from a Frontmatter struct
func BuildContent ¶
func BuildContent(fm *Frontmatter, bodyContent string) string
BuildContent combines frontmatter and body content into a complete document
func ExtractPathTags ¶
ExtractPathTags generates tags from a note type path (e.g., "issues/bugs" -> ["issues", "bugs"])
func FormatTimestamp ¶
FormatTimestamp formats a time.Time into the standard frontmatter timestamp format
Types ¶
type Frontmatter ¶
type Frontmatter struct {
ID string `yaml:"id"`
Title string `yaml:"title"`
Type string `yaml:"type,omitempty"` // Note type (chat, interactive_agent, etc.)
Aliases []string `yaml:"aliases,flow"`
Tags []string `yaml:"tags,flow"`
Repository string `yaml:"repository,omitempty"`
Branch string `yaml:"branch,omitempty"`
Worktree string `yaml:"worktree,omitempty"`
Created string `yaml:"created"`
Modified string `yaml:"modified"`
Started string `yaml:"started,omitempty"` // For LLM notes
PlanRef string `yaml:"plan_ref,omitempty"` // Reference to associated plan
// Remote sync metadata
Remote *RemoteMetadata `yaml:"remote,omitempty"`
// Blog-specific fields
Description string `yaml:"description,omitempty"`
PublishDate string `yaml:"publishDate,omitempty"`
UpdatedDate string `yaml:"updatedDate,omitempty"`
Draft bool `yaml:"draft,omitempty"`
Featured bool `yaml:"featured,omitempty"`
}
Frontmatter represents the structured metadata at the beginning of a note
type RemoteMetadata ¶
type RemoteMetadata struct {
Provider string `yaml:"provider,omitempty"`
ID string `yaml:"id,omitempty"`
URL string `yaml:"url,omitempty"`
State string `yaml:"state,omitempty"`
UpdatedAt string `yaml:"updated_at,omitempty"`
Labels []string `yaml:"labels,flow,omitempty"`
Assignees []string `yaml:"assignees,flow,omitempty"`
Milestone string `yaml:"milestone,omitempty"`
}
RemoteMetadata represents sync metadata from remote sources (GitHub, etc.)
Click to show internal directories.
Click to hide internal directories.