generate

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: 16 Imported by: 0

Documentation

Overview

Package generate builds site index pages, READMEs, and navigation for journal static sites.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateIndex

func GenerateIndex(entries []entity.JournalEntry) string

GenerateIndex creates the index.md content for the journal site.

Parameters:

  • entries: All journal entries to include

Returns:

  • string: Markdown content for index.md

func GenerateSiteReadme

func GenerateSiteReadme(journalDir string) string

GenerateSiteReadme creates a README for the journal-site directory.

Parameters:

  • journalDir: Path to the source journal directory

Returns:

  • string: Markdown README content with regeneration instructions

func GenerateZensicalToml

func GenerateZensicalToml(
	entries []entity.JournalEntry, topics []entity.TopicData,
	keyFiles []entity.KeyFileData, sessionTypes []entity.TypeData,
) string

GenerateZensicalToml creates the zensical.toml configuration for the journal site.

Parameters:

  • entries: All journal entries for navigation
  • topics: Topic index data for nav links
  • keyFiles: Key file index data for nav links
  • sessionTypes: Session type index data for nav links

Returns:

  • string: Complete zensical.toml content
func InjectedSourceLink(content, sourcePath string) string

InjectedSourceLink inserts a "View source" link into a journal entry's content. The link is placed after YAML frontmatter if present, otherwise at the top.

Parameters:

  • content: Raw Markdown content of the journal entry
  • sourcePath: Path to the source file on disk

Returns:

  • string: Content with the source link injected

func InjectedSummary

func InjectedSummary(content, summary string) string

InjectedSummary inserts the session summary as an admonition after the frontmatter (and any source link). Placed before the first heading.

Parameters:

  • content: Markdown content (may already have the source link injected)
  • summary: InjectedSummary text from frontmatter

Returns:

  • string: Content with the summary admonition injected

Types

This section is empty.

Jump to

Keyboard shortcuts

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