Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BuildVersion string BuildTime string BuildCommit string )
Build time and commit information.
⚠️ WARNING: should only be set by "-ldflags".
View Source
var ( // Application settings App struct { // ⚠️ WARNING: Should only be set by the main package (i.e. "main.go"). Version string `ini:"-"` Env string HTTPHost string `ini:"HTTP_ADDR"` HTTPPort int `ini:"HTTP_PORT"` } // Site settings Site struct { Description string ExternalURL string `ini:"EXTERNAL_URL"` } // Asset settings Asset struct { CustomDirectory string } // Page settings Page struct { HasLandingPage bool DocsBasePath string CustomDirectory string } // I18n settings I18n struct { Languages []string Names []string CustomDirectory string } // Documentation settings Docs struct { Type DocType Target string TargetDir string EditPageLinkFormat string } // Extension settings Extension struct { Plausible struct { Enabled bool Domain string } GoogleAnalytics struct { Enabled bool MeasurementID string `ini:"MEASUREMENT_ID"` } Disqus struct { Enabled bool Shortname string } Utterances struct { Enabled bool Repo string IssueTerm string Label string Theme string } } )
View Source
var File *ini.File
File is the configuration object.
Functions ¶
func Init ¶
Init initializes configuration from conf assets and given custom configuration file. If `customConf` is empty, it falls back to default location, i.e. "<WORK DIR>/custom".
It is safe to call this function multiple times with desired `customConf`, but it is not concurrent safe.
NOTE: The order of loading configuration sections matters as one may depend on another.
Types ¶
Click to show internal directories.
Click to hide internal directories.