docs

package
v0.0.0-...-8b1c5d1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package docs provides embedded documentation access and rendering.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Content

func Content(name string) (string, error)

Content returns the raw markdown content of a document.

func RenderHTML

func RenderHTML(name string) (string, error)

RenderHTML converts markdown content to HTML.

func RenderMarkdownToHTML

func RenderMarkdownToHTML(markdown string) (string, error)

RenderMarkdownToHTML converts arbitrary markdown string to HTML.

func RenderMarkdownToTerminal

func RenderMarkdownToTerminal(markdown string, width int) (string, error)

RenderMarkdownToTerminal converts arbitrary markdown string to terminal output.

func RenderTerminal

func RenderTerminal(name string, width int) (string, error)

RenderTerminal converts markdown content to styled terminal output. width specifies the terminal width for word wrapping.

Types

type Doc

type Doc struct {
	// Name is the filename without extension (e.g., "README")
	Name string
	// Title is a human-readable title derived from the name
	Title string
	// Description is a brief description of the doc's purpose
	Description string
	// Path is the full path within the embed FS
	Path string
}

Doc represents a documentation file.

func Get

func Get(name string) (*Doc, error)

Get retrieves a documentation file by name. Name should be without the .md extension.

func List

func List() ([]Doc, error)

List returns all available documentation files.

Jump to

Keyboard shortcuts

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