Documentation
¶
Overview ¶
Package generate builds site index pages, READMEs, and navigation for journal static sites.
Index ¶
- func GenerateIndex(entries []entity.JournalEntry) string
- func GenerateSiteReadme(journalDir string) string
- func GenerateZensicalToml(entries []entity.JournalEntry, topics []entity.TopicData, ...) string
- func InjectedSourceLink(content, sourcePath string) string
- func InjectedSummary(content, summary string) string
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 ¶
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 ¶
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 ¶
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.