Documentation
¶
Index ¶
- Constants
- func GetLatestModel(provider *catalogs.Provider) string
- func SortedModels(models map[string]catalogs.Model) []*catalogs.Model
- type Breadcrumb
- type FrontMatter
- type FrontMatterOption
- type Generator
- type LogoCopier
- type Markdown
- func (m *Markdown) Alert(alertType string, text string) *Markdown
- func (m *Markdown) Badge(label, message, color string) *Markdown
- func (m *Markdown) Blockquote(text string) *Markdown
- func (m *Markdown) Bold(text string) *Markdown
- func (m *Markdown) BoldLink(text, url string) *Markdown
- func (m *Markdown) BooleanCheck(value bool) *Markdown
- func (m *Markdown) Build() error
- func (m *Markdown) BulletList(items ...string) *Markdown
- func (m *Markdown) CheckboxList(items []struct{ ... }) *Markdown
- func (m *Markdown) Code(code string) *Markdown
- func (m *Markdown) CodeBlock(syntax, code string) *Markdown
- func (m *Markdown) CodeInline(text string) *Markdown
- func (m *Markdown) ComparisonTable(headers []string, rows [][]any) *Markdown
- func (m *Markdown) ConditionalSection(condition bool, f func(*Markdown)) *Markdown
- func (m *Markdown) CountText(count int, singular, plural string) *Markdown
- func (m *Markdown) Details(summary, content string) *Markdown
- func (m *Markdown) FeatureTable(headers []string, rows [][]bool) *Markdown
- func (m *Markdown) FormatCurrency(value float64, currency string) *Markdown
- func (m *Markdown) FormatModelID(id string) *Markdown
- func (m *Markdown) H1(text string) *Markdown
- func (m *Markdown) H2(text string) *Markdown
- func (m *Markdown) H3(text string) *Markdown
- func (m *Markdown) H4(text string) *Markdown
- func (m *Markdown) HorizontalRule() *Markdown
- func (m *Markdown) HugoFrontMatter(title string, weight int, opts ...FrontMatterOption) *Markdown
- func (m *Markdown) Image(alt, url string) *Markdown
- func (m *Markdown) ImageWithStyle(alt, url string, width, height int) *Markdown
- func (m *Markdown) Italic(text string) *Markdown
- func (m *Markdown) JoinList(items []string, separator string) *Markdown
- func (m *Markdown) LF() *Markdown
- func (m *Markdown) Link(text, url string) *Markdown
- func (m *Markdown) NavigationFooter(prevText, prevURL, nextText, nextURL, upText, upURL string) *Markdown
- func (m *Markdown) OrderedList(items ...string) *Markdown
- func (m *Markdown) PlainText(text string) *Markdown
- func (m *Markdown) PlainTextf(format string, args ...any) *Markdown
- func (m *Markdown) RawHTML(html string) *Markdown
- func (m *Markdown) String() string
- func (m *Markdown) Table(table md.TableSet) *Markdown
- func (m *Markdown) TruncateText(text string, maxLen int) *Markdown
- func (m *Markdown) Writer() io.Writer
- type MenuConfig
- type MenuEntry
- type NavigationContext
- type NavigationLink
- type Option
Constants ¶
const ( // Display symbols. CheckMark = "✅" CrossMark = "❌" EmDash = "—" // Common values. Yes = "Yes" No = "No" NA = "N/A" Free = "Free" )
Common display constants used across documentation.
Variables ¶
This section is empty.
Functions ¶
func GetLatestModel ¶
GetLatestModel returns the "latest" model from a provider in a deterministic way It picks the model with the lexicographically last ID (often newest versions have higher IDs).
Types ¶
type Breadcrumb ¶
Breadcrumb represents a single breadcrumb navigation item.
type FrontMatter ¶
type FrontMatter struct {
Title string
Description string
Weight int
Author string
Draft bool
Menu *MenuConfig
}
FrontMatter represents Hugo front matter.
type FrontMatterOption ¶
type FrontMatterOption func(*FrontMatter)
FrontMatterOption is a functional option for front matter.
func WithAuthor ¶
func WithAuthor(author string) FrontMatterOption
WithAuthor adds an author to the front matter.
func WithDescription ¶
func WithDescription(desc string) FrontMatterOption
WithDescription adds a description to the front matter.
func WithMenu ¶
func WithMenu(menuType string, weight int) FrontMatterOption
WithMenu adds menu configuration to the front matter.
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator handles documentation generation.
type LogoCopier ¶
type LogoCopier struct {
// contains filtered or unexported fields
}
LogoCopier handles copying logos from embedded resources.
func NewLogoCopier ¶
func NewLogoCopier(embedFS embed.FS, sourceDir, targetDir string) *LogoCopier
NewLogoCopier creates a new logo copier.
func (*LogoCopier) CopyAllLogos ¶
func (lc *LogoCopier) CopyAllLogos() error
CopyAllLogos copies all logos from embedded resources.
func (*LogoCopier) CopyAuthorLogos ¶
func (lc *LogoCopier) CopyAuthorLogos(authors []*catalogs.Author) error
CopyAuthorLogos copies all author logos to the documentation directory.
func (*LogoCopier) CopyProviderLogos ¶
func (lc *LogoCopier) CopyProviderLogos(providers []*catalogs.Provider) error
CopyProviderLogos copies all provider logos to the documentation directory.
type Markdown ¶
type Markdown struct {
// contains filtered or unexported fields
}
Markdown wraps the markdown package to provide Hugo-specific functionality.
func NewMarkdown ¶
NewMarkdown creates a new markdown builder.
func NewMarkdownBuffer ¶
func NewMarkdownBuffer() *Markdown
NewMarkdownBuffer creates a new markdown builder with internal buffer.
func (*Markdown) Blockquote ¶
Blockquote adds a blockquote.
func (*Markdown) BooleanCheck ¶
BooleanCheck adds a checkmark or X based on boolean value.
func (*Markdown) BulletList ¶
BulletList adds a bullet list.
func (*Markdown) CheckboxList ¶
CheckboxList adds a checkbox list.
func (*Markdown) CodeInline ¶
CodeInline adds inline code.
func (*Markdown) ComparisonTable ¶
ComparisonTable creates a comparison table with provider logos.
func (*Markdown) ConditionalSection ¶
ConditionalSection adds content only if condition is true.
func (*Markdown) FeatureTable ¶
FeatureTable creates a table with checkmarks/crosses for features.
func (*Markdown) FormatCurrency ¶
FormatCurrency formats a currency value with symbol.
func (*Markdown) FormatModelID ¶
FormatModelID formats a model ID with code style.
func (*Markdown) HorizontalRule ¶
HorizontalRule adds a horizontal rule.
func (*Markdown) HugoFrontMatter ¶
func (m *Markdown) HugoFrontMatter(title string, weight int, opts ...FrontMatterOption) *Markdown
HugoFrontMatter adds Hugo front matter to the document.
func (*Markdown) ImageWithStyle ¶
ImageWithStyle adds an image with inline CSS styling for Hugo.
func (*Markdown) NavigationFooter ¶
func (m *Markdown) NavigationFooter(prevText, prevURL, nextText, nextURL, upText, upURL string) *Markdown
NavigationFooter adds a standard navigation footer for Hugo docs.
func (*Markdown) OrderedList ¶
OrderedList adds an ordered list.
func (*Markdown) PlainTextf ¶
PlainTextf adds formatted plain text.
func (*Markdown) TruncateText ¶
TruncateText adds text that may be truncated with ellipsis.
type MenuConfig ¶
MenuConfig represents menu configuration in Hugo front matter.
type NavigationContext ¶
type NavigationContext struct {
}
NavigationContext provides context for generating navigation elements.
type NavigationLink ¶
type NavigationLink struct {
}
NavigationLink represents a navigation link with optional description.
type Option ¶
type Option func(*Generator)
Option is a functional option for configuring the Generator.
func WithOutputDir ¶
WithOutputDir sets the output directory for generated documentation.