config

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2025 License: MIT Imports: 4 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 {
	// Verbose defines if debug logs should be shown
	Verbose bool `yaml:"verbose"`

	// InputFolder is the directory where input posts are located.
	InputFolder string `yaml:"input_folder"`

	// OutputFolder is the directory where the generated website will be placed.
	OutputFolder string `yaml:"output_folder"`

	// StaticFolder is the directory containing static assets (CSS, JS, images)
	StaticFolder string `yaml:"static_folder"`

	// TemplateDir is the directory containing custom templates (optional)
	// If not specified, default templates will be used from templates/defaults/
	TemplateDir string `yaml:"template_dir"`

	// Site contains metadata about the website
	Site SiteMetadata `yaml:"site"`

	// PostsPerPage defines how many posts to show per page (pagination)
	PostsPerPage int `yaml:"posts_per_page"`

	// BlogPath is the URL path for the blog (e.g., "/blog")
	BlogPath string `yaml:"blog_path"`
}

Config represents the configuration structure for the application.

func ParseConfig

func ParseConfig(name string) (Config, error)

ParseConfig reads a YAML configuration file and returns a Config struct.

type SiteMetadata

type SiteMetadata struct {
	Title       string `yaml:"title"`
	Description string `yaml:"description"`
	Author      string `yaml:"author"`
	URL         string `yaml:"url"`
}

SiteMetadata contains information about the website

Jump to

Keyboard shortcuts

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