man

package
v1.15.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderMarkdown

func RenderMarkdown(content string, width int, style string) ([]string, error)

RenderMarkdown renders markdown content to ANSI-formatted terminal output. style should be a glamour standard style name ("dark", "light", "dracula", etc.).

func SectionLabel

func SectionLabel(section string) string

SectionLabel returns the display name for a section key.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the bubbletea model for the documentation browser.

func NewModel

func NewModel(pages []Page, args []string, glamStyle string) Model

NewModel creates a new Model. If args contains a page slug, that page is opened directly. glamStyle should be determined before the TUI starts (e.g. "dark" or "light").

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model. Pre-renders all pages concurrently so the cache is warm by the time the user opens any page.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (Model) View

func (m Model) View() string

View implements tea.Model.

type Page

type Page struct {
	Title   string
	Section string
	Slug    string
	Path    string
	// contains filtered or unexported fields
}

Page represents a single documentation page.

func BuildRegistry

func BuildRegistry() []Page

BuildRegistry walks the embedded docs FS and returns all pages in section order.

func FilterPages

func FilterPages(pages []Page, filter string) []Page

FilterPages returns pages whose title or content contains the filter string (case-insensitive).

func (Page) Content

func (p Page) Content() string

Content returns the raw markdown content of the page.

Jump to

Keyboard shortcuts

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