format

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deck

type Deck struct {
	Metadata string
	Slides   []Slide
}

Deck represents a complete presentation.

func (Deck) Insert

func (d Deck) Insert(pos int, newSlides []Slide) Deck

Insert returns a new deck with newSlides inserted before position pos (0-based).

type Format

type Format interface {
	Parse(data []byte) Deck
	Render(d Deck) []byte
	ExtractTitle(content string) string
	DefaultFile() string
	RenderSlide(s Slide) string
	RenameSlide(s Slide, name string) Slide
	NewSlide(title string) Slide
	RenameDeck(d Deck, name string) Deck
	Scaffold(title, slug string) []ScaffoldFile
	PostScaffoldCmd() []string
}

Format defines how a presentation file is parsed and rendered.

type ScaffoldFile

type ScaffoldFile struct {
	Path    string
	Content string
	IsDir   bool
}

ScaffoldFile describes a file or directory to create when scaffolding a new presentation.

type Slide

type Slide struct {
	Metadata string // format-specific metadata (empty string if none)
	Content  string // raw slide content
}

Slide represents a single slide in a presentation.

Jump to

Keyboard shortcuts

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