Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ConfigFileDir is the directory of the configuration file. ConfigFileDir = "." // ConfigFileName is the name of the configuration file. ConfigFileName = "gic.config" // ConfigFileType is the type of the configuration file. ConfigFileType = "yaml" )
Variables ¶
View Source
var GitHubToken string
Functions ¶
func CompileTimeTemplate ¶ added in v0.6.0
compile compiles a template with the given datetime. %Y - Year with century as a decimal number. %m - Month as a decimal number [01,12]. %d - Day of the month as a decimal number [01,31]. %H - Hour (24-hour clock) as a decimal number [00,23]. %M - Minute as a decimal number [00,59]. %S - Second as a decimal number [00,59].
func GetConfigPath ¶
func GetConfigPath() string
Types ¶
type Config ¶
type Config struct {
GitHub *GitHubConfig `yaml:"github"`
Hugo *HugoConfig `yaml:"hugo"`
}
func Get ¶
func Get() Config
Get returns a configuration. If the configuration is not loaded, it loads it.
func (*Config) WarnDeprecatedOptions ¶ added in v0.6.0
type GitHubConfig ¶
type GitHubConfig struct {
Username string `yaml:"username"`
Repository string `yaml:"repository"`
}
func NewGitHubConfig ¶ added in v0.6.0
func NewGitHubConfig() *GitHubConfig
func (*GitHubConfig) RepositoryURL ¶
func (c *GitHubConfig) RepositoryURL() string
type HugoConfig ¶
type HugoConfig struct {
Bundle string `yaml:"bundle,omitempty"`
Directory *HugoDirectoryConfig `yaml:"directory"`
Filename *HugoFilenameConfig `yaml:"filename"`
Url *HugoURLConfig `yaml:"url"`
}
func NewHugoConfig ¶ added in v0.6.0
func NewHugoConfig() *HugoConfig
type HugoDirectoryConfig ¶
func NewHugoDirectoryConfig ¶ added in v0.6.0
func NewHugoDirectoryConfig() *HugoDirectoryConfig
type HugoFilenameConfig ¶ added in v0.6.0
func NewHugoFilenameConfig ¶ added in v0.6.0
func NewHugoFilenameConfig() *HugoFilenameConfig
type HugoURLConfig ¶
type HugoURLConfig struct {
AppendSlash bool `yaml:"appendSlash,omitempty"`
Images string `yaml:"images"`
}
func NewHugoURLConfig ¶ added in v0.6.0
func NewHugoURLConfig() *HugoURLConfig
Click to show internal directories.
Click to hide internal directories.