Documentation ¶
Index ¶
- func Unmarshal(bytes []byte, c *Config) error
- type Config
- func (c *Config) ApplyFlags(flags Flags)
- func (c *Config) GetFrontMatterDefaults(typename, relpath string) (m map[string]interface{})
- func (c *Config) IsMarkdown(name string) bool
- func (c *Config) IsSASSPath(name string) bool
- func (c *Config) MarkdownExtensions() []string
- func (c *Config) OutputExt(pathname string) string
- func (c *Config) SourceDir() string
- type Flags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Where things are: Source string Destination string LayoutsDir string `yaml:"layouts_dir"` DataDir string `yaml:"data_dir"` IncludesDir string `yaml:"includes_dir"` Collections map[string]map[string]interface{} `yaml:"-"` // Handling Reading Include []string Exclude []string KeepFiles []string `yaml:"keep_files"` MarkdownExt string `yaml:"markdown_ext"` // Filtering Content Drafts bool `yaml:"show_drafts"` Future bool Unpublished bool // Plugins Plugins []string // Plugins ExcerptSeparator string `yaml:"excerpt_separator"` // Serving Host string Port int AbsoluteURL string `yaml:"url"` BaseURL string // Outputting Permalink string Defaults []struct { Scope struct { Path string Type string } Values map[string]interface{} } Variables map[string]interface{} `yaml:"-"` }
Config is the Jekyll site configuration, typically read from _config.yml. See https://jekyllrb.com/docs/configuration/#default-configuration
func Default ¶
func Default() Config
Default returns a default site configuration.
This is a function instead of a global variable, and returns a new value each time, since the caller may overwrite it.
func FromString ¶
FromString returns a new configuration initialized from a string
func (*Config) ApplyFlags ¶
ApplyFlags overwrites the configuration with values from flags.
func (*Config) GetFrontMatterDefaults ¶
GetFrontMatterDefaults implements https://jekyllrb.com/docs/configuration/#front-matter-defaults
func (*Config) IsMarkdown ¶
IsMarkdown returns a boolean indicating whether the file is a Markdown file, according to the current project.
func (*Config) IsSASSPath ¶
IsSASSPath returns a boolean indicating whether the file is a Sass (".sass" or ".scss") file.
func (*Config) MarkdownExtensions ¶
MarkdownExtensions returns a list of markdown extensions, with dotsa.