frontmatter

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package frontmatter resolves headings and builds YAML frontmatter for journal entries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveHeading

func ResolveHeading(title, slug, baseName string) string

resolveHeading returns the first non-empty value among title, slug, baseName.

Parameters:

  • title: Preferred heading text
  • slug: Fallback slug from session metadata
  • baseName: Last-resort filename base

Returns:

  • string: First non-empty value

func WriteFmInt

func WriteFmInt(sb *strings.Builder, key string, value int)

writeFmInt writes a YAML frontmatter integer field.

Parameters:

  • sb: String builder to write to
  • key: Frontmatter key
  • value: Integer value

func WriteFmQuoted

func WriteFmQuoted(sb *strings.Builder, key, value string)

writeFmQuoted writes a YAML frontmatter quoted string field.

Parameters:

  • sb: String builder to write to
  • key: Frontmatter key
  • value: Quoted string value

func WriteFmString

func WriteFmString(sb *strings.Builder, key, value string)

writeFmString writes a YAML frontmatter bare string field.

Parameters:

  • sb: String builder to write to
  • key: Frontmatter key
  • value: Bare string value

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL