config

package
v0.0.0-...-220da06 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Site struct {
		Title       string `mapstructure:"title"`
		Description string `mapstructure:"description"`
		BaseURL     string `mapstructure:"base_url"`
		Language    string `mapstructure:"language"`
	} `mapstructure:"site"`
	Author  string `mapstructure:"author"`
	Content struct {
		SourceDir    string `mapstructure:"source_dir"`
		PostsDir     string `mapstructure:"posts_dir"`
		OutputDir    string `mapstructure:"output_dir"`
		TemplatesDir string `mapstructure:"templates_dir"`
		PagesDir     string `mapstructure:"pages_dir"`
		ImagesDir    string `mapstructure:"images_dir"`
		PostsPerPage int    `mapstructure:"posts_per_page"`
	} `mapstructure:"content"`
	Theme struct {
		Name               string `mapstructure:"name"`
		SyntaxHighlighting bool   `mapstructure:"syntax_highlighting"`
	} `mapstructure:"theme"`
	Build struct {
		Draft  bool `mapstructure:"draft"`
		Future bool `mapstructure:"future"`
	} `mapstructure:"build"`
	Server struct {
		Port int    `mapstructure:"port"`
		Host string `mapstructure:"host"`
	} `mapstructure:"server"`
	Social struct {
		Twitter  string `mapstructure:"twitter"`
		GitHub   string `mapstructure:"github"`
		LinkedIn string `mapstructure:"linkedin"`
	} `mapstructure:"social"`
	Features struct {
		Comments bool `mapstructure:"comments"`
		Search   bool `mapstructure:"search"`
		RSS      bool `mapstructure:"rss"`
	} `mapstructure:"features"`
	Custom struct {
		GoogleAnalytics string `mapstructure:"google_analytics"`
		DisqusShortname string `mapstructure:"disqus_shortname"`
	} `mapstructure:"custom"`
	Logging struct {
		Level string `yaml:"level"`
	} `yaml:"logging"`
}

func Load

func Load() (*Config, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL