Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ValidConfigFileExtensions = []string{"toml"}
)
Functions ¶
func FromFileToMap ¶
FromFileToMap is the same as FromFile, but it returns the config values as a simple map.
func GetNumWorkerMultiplier ¶
func GetNumWorkerMultiplier() int
GetNumWorkerMultiplier returns the base value used to calculate the number of workers to use for Hugo's parallel execution. It returns the value in HUGO_NUMWORKERMULTIPLIER OS env variable if set to a positive integer, else the number of logical CPUs.
func GetStringSlicePreserveString ¶
GetStringSlicePreserveString returns a string slice from the given config and key. It differs from the GetStringSlice method in that if the config value is a string, we do not attempt to split it into fields.
Types ¶
type Provider ¶
type Provider interface { GetString(key string) string GetInt(key string) int GetBool(key string) bool GetParams(key string) maps.Params GetStringMap(key string) map[string]any GetStringMapString(key string) map[string]string GetStringSlice(key string) []string Get(key string) any Set(key string, value any) Merge(key string, value any) SetDefaults(params maps.Params) SetDefaultMergeStrategy() WalkParams(walkFn func(params ...KeyParams) bool) IsSet(key string) bool }
Provider provides the configuration settings for Hugo.
func NewCompositeConfig ¶
NewCompositeConfig creates a new composite Provider with a read-only base and a writeable layer.