config

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APISpec added in v1.1.4

type APISpec struct {
	// Spec is the path to the OpenAPI file. It may be given relative to the
	// project root (e.g. "apis/teams.yaml") or as a bare file name ("teams.yaml")
	// that is matched against the files discovered under apis/.
	Spec        string `yaml:"spec"`
	Slug        string `yaml:"slug,omitempty"`
	Title       string `yaml:"title,omitempty"`
	Description string `yaml:"description,omitempty"`
}

APISpec configures a single OpenAPI specification. Configuring a spec is optional: any spec under apis/ is auto-discovered. Listing one here only affects ordering (configured specs come first, in this order; the rest follow auto-discovered at the end) and lets you override the slug/title/description derived from the file name and the spec's info block.

type Banner struct {
	Message     string `yaml:"message"`
	Color       string `yaml:"color"`
	Dismissible bool   `yaml:"dismissible"`
}

type Branding added in v1.0.5

type Branding struct {
	LogoLight  string `yaml:"logo_light"`
	LogoDark   string `yaml:"logo_dark"`
	LogoAlt    string `yaml:"logo_alt"`
	LogoLink   string `yaml:"logo_link"`
	LogoWidth  string `yaml:"logo_width"`
	LogoHeight string `yaml:"logo_height"`
	Favicon    string `yaml:"favicon"`
}

type Config

type Config struct {
	Title       string       `yaml:"title"`
	Description string       `yaml:"description"`
	URL         string       `yaml:"url"`
	Language    string       `yaml:"language"`
	Theme       string       `yaml:"theme"`
	Redirect    string       `yaml:"redirect,omitempty"`
	Branding    Branding     `yaml:"branding"`
	Footer      Footer       `yaml:"footer"`
	Navigation  []NavItem    `yaml:"navigation"`
	Sections    SectionPaths `yaml:"sections"`
	Banner      Banner       `yaml:"banner,omitempty"`
	EditBaseURL string       `yaml:"edit_base_url,omitempty"`
	LLMs        LLMsConfig   `yaml:"llms,omitempty"`
	APIs        []APISpec    `yaml:"apis,omitempty"`
}

func DefaultConfig

func DefaultConfig() Config

func Load

func Load(rootDir string) (Config, error)

func (Config) Save

func (c Config) Save(rootDir string) error
type Footer struct {
	Copyright string         `yaml:"copyright"`
	Position  string         `yaml:"position"`
	Columns   []FooterColumn `yaml:"columns"`
	Social    []FooterSocial `yaml:"social"`
}

type FooterColumn added in v1.0.5

type FooterColumn struct {
	Title string       `yaml:"title"`
	Links []FooterLink `yaml:"links"`
}
type FooterLink struct {
	Label string `yaml:"label"`
	Href  string `yaml:"href"`
}

type FooterSocial added in v1.0.5

type FooterSocial struct {
	Icon  string `yaml:"icon"`
	Href  string `yaml:"href"`
	Label string `yaml:"label"`
}

type LLMsConfig added in v1.1.0

type LLMsConfig struct {
	LLMsTxt     bool `yaml:"llms_txt"`
	LLMsTxtFull bool `yaml:"llms_txt_full"`
}
type NavItem struct {
	Label string `yaml:"label"`
	Path  string `yaml:"path"`
}

type SectionPaths

type SectionPaths struct {
	Docs      string `yaml:"docs"`
	Guides    string `yaml:"guides"`
	Tutorials string `yaml:"tutorials"`
}

Jump to

Keyboard shortcuts

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