Documentation
¶
Index ¶
Constants ¶
View Source
const ProjectConfigFile = "taufinity.yaml"
ProjectConfigFile is the filename for per-project configuration.
Variables ¶
This section is empty.
Functions ¶
func FindProjectRoot ¶
FindProjectRoot walks up the directory tree to find taufinity.yaml.
Types ¶
type ProjectConfig ¶
type ProjectConfig struct {
Site string `yaml:"site,omitempty"`
Template string `yaml:"template,omitempty"`
PreviewData string `yaml:"preview_data,omitempty"`
Ignore []string `yaml:"ignore,omitempty"`
Warnings []string `yaml:"-"` // Populated during loading (e.g. unknown keys)
}
ProjectConfig holds per-project configuration from taufinity.yaml.
func LoadProject ¶
func LoadProject(dir string) (*ProjectConfig, error)
LoadProject reads the project config from the given directory.
func LoadProjectFromCwd ¶
func LoadProjectFromCwd() (*ProjectConfig, string, error)
LoadProjectFromCwd finds and loads project config from current directory or parents.
type UserConfig ¶
type UserConfig struct {
Site string `yaml:"site,omitempty"`
APIURL string `yaml:"api_url,omitempty"`
Org string `yaml:"org,omitempty"`
// UpdateCheck controls the background staleness check. Empty = enabled,
// "false" = disabled. Kept as a string to stay consistent with the other
// string-valued config keys handled by Set/Get/List.
UpdateCheck string `yaml:"update_check,omitempty"`
// AutoUpdate, when "true", automatically runs `taufinity update` at exit
// whenever a newer version is detected. The update uses the same backup +
// smoke-test + auto-rollback logic as the manual `taufinity update` command,
// so a bad build is reverted automatically and users are never locked out.
// Opt in: taufinity config set auto_update true
AutoUpdate string `yaml:"auto_update,omitempty"`
}
UserConfig holds user-level configuration stored in ~/.config/taufinity/config.yaml.
Click to show internal directories.
Click to hide internal directories.