config

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileConfig

type FileConfig struct {
	Title        string `yaml:"title"`
	Description  string `yaml:"description"`
	BaseURL      string `yaml:"base_url"`
	Author       string `yaml:"author"`
	Theme        string `yaml:"theme"`
	DarkMode     bool   `yaml:"dark_mode"`
	EnableLLMS   bool   `yaml:"enable_llms"`
	EnableSearch bool   `yaml:"enable_search"`
	CleanURLs    bool   `yaml:"clean_urls"`
	Entrypoint   string `yaml:"entrypoint"`

	OpenAPI struct {
		Enabled           bool     `yaml:"enabled"`
		SpecFiles         []string `yaml:"spec_files"`
		SpecURLs          []string `yaml:"spec_urls"`
		DefaultView       string   `yaml:"default_view"`
		SyncOnBuild       bool     `yaml:"sync_on_build"`
		CacheDir          string   `yaml:"cache_dir"`
		EnableTesting     bool     `yaml:"enable_testing"`
		EnableExport      bool     `yaml:"enable_export"`
		EnableCodeSamples bool     `yaml:"enable_code_samples"`
		LazyLoadChunkSize int      `yaml:"lazy_load_chunk_size"`
	} `yaml:"openapi"`

	Status struct {
		Enabled       bool   `yaml:"enabled"`
		Title         string `yaml:"title"`
		Description   string `yaml:"description"`
		Path          string `yaml:"path"`
		ShowHistory   bool   `yaml:"show_history"`
		HistoryMonths int    `yaml:"history_months"`
		RSSEnabled    bool   `yaml:"rss_enabled"`
	} `yaml:"status"`

	Changelog struct {
		Enabled     bool   `yaml:"enabled"`
		Title       string `yaml:"title"`
		Description string `yaml:"description"`
		Path        string `yaml:"path"`
		RSSEnabled  bool   `yaml:"rss_enabled"`
		Repository  string `yaml:"repository"`
	} `yaml:"changelog"`

	StaleWarning struct {
		Enabled        bool   `yaml:"enabled"`
		ThresholdDays  int    `yaml:"threshold_days"`
		Message        string `yaml:"message"`
		ShowUpdateDate bool   `yaml:"show_update_date"`
	} `yaml:"stale_warning"`

	Landing       core.LandingConfig      `yaml:"landing"`
	ThemeConfig   core.ThemeConfig        `yaml:"theme_config"`
	Portfolio     core.PortfolioConfig    `yaml:"portfolio"`
	Contact       core.ContactConfig      `yaml:"contact"`
	Faq           core.FaqConfig          `yaml:"faq"`
	Legal         core.LegalConfig        `yaml:"legal"`
	KnowledgeBase core.KBConfig           `yaml:"knowledgebase"`
	Waitlist      core.WaitlistConfig     `yaml:"waitlist"`
	Roadmap       core.RoadmapConfig      `yaml:"roadmap"`
	Footer        core.FooterConfig       `yaml:"footer"`
	LinkCheck     core.LinkCheckConfig    `yaml:"link_check"`
	Versions      core.VersionConfig      `yaml:"versions"`
	I18n          core.I18nConfig         `yaml:"i18n"`
	PDFExport     core.PDFExportConfig    `yaml:"pdf_export"`
	ClaudeAssist  core.ClaudeAssistConfig `yaml:"claude_assist"`
	Analytics     core.AnalyticsConfig    `yaml:"analytics"`
	MCP           core.MCPConfig          `yaml:"mcp"`

	SocialLinks []SocialLinkConfig `yaml:"social_links"`
}

FileConfig represents the structure of config.yaml

func LoadConfig

func LoadConfig(docsDir string) (*FileConfig, error)

LoadConfig loads config.yaml from the docs directory if it exists Returns nil if no config file is found (not an error)

func (*FileConfig) MergeWithCLI

func (cfg *FileConfig) MergeWithCLI(cliConfig core.SiteConfig, cliFlags map[string]bool) core.SiteConfig

MergeWithCLI merges config file with CLI flags. CLI flags take precedence over config file values.

type SocialLinkConfig

type SocialLinkConfig struct {
	Name string `yaml:"name"`
	URL  string `yaml:"url"`
	Icon string `yaml:"icon"`
}

SocialLinkConfig represents a social link in config.yaml

Jump to

Keyboard shortcuts

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