render

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package render provides interfaces and utilities for rendering V2MOM documents to various output formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Theme name (renderer-specific, e.g., "default", "corporate", "minimal")
	Theme string

	// Terminology mode: "v2mom", "okr", or "hybrid"
	Terminology string

	// Structure handling: override structure detection ("flat", "nested", "hybrid")
	Structure string

	// Include project/roadmap slides
	IncludeProjects bool

	// Include status indicators (colors, badges)
	IncludeStatus bool

	// FlattenMeasures combines global + nested measures into single view
	FlattenMeasures bool

	// Custom CSS (for Marp/HTML renderers)
	CustomCSS string

	// Additional metadata (renderer-specific)
	Metadata map[string]string
}

Options contains rendering options common to all renderers.

func DefaultOptions

func DefaultOptions() *Options

DefaultOptions returns sensible default rendering options.

func (*Options) GetStructure

func (o *Options) GetStructure(v *v2mom.V2MOM) string

GetStructure returns the structure to use, preferring options over V2MOM inference.

func (*Options) GetTerminology

func (o *Options) GetTerminology(v *v2mom.V2MOM) string

GetTerminology returns the terminology to use, preferring options over V2MOM metadata.

type Renderer

type Renderer interface {
	// Render converts a V2MOM to the target format.
	Render(v *v2mom.V2MOM, opts *Options) ([]byte, error)
	// Format returns the output format name (e.g., "marp", "confluence").
	Format() string
	// FileExtension returns the file extension for this format (e.g., ".md", ".html").
	FileExtension() string
}

Renderer defines the interface for output format renderers.

Directories

Path Synopsis
Package marp provides a Marp markdown renderer for V2MOM documents.
Package marp provides a Marp markdown renderer for V2MOM documents.

Jump to

Keyboard shortcuts

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