config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: BSD-3-Clause Imports: 3 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 {
	BaseURL          string           `toml:"base_url"`
	Title            string           `toml:"title"`
	Description      string           `toml:"description"`
	DefaultLanguage  string           `toml:"default_language"`
	Author           string           `toml:"author"`
	CompileSass      bool             `toml:"compile_sass"`
	GenerateFeed     bool             `toml:"generate_feed"`
	FeedLimit        int              `toml:"feed_limit"`
	FeedsForContent  []ContentFeed    `toml:"feeds_for_content"`
	Taxonomies       []TaxonomyConfig `toml:"taxonomies"`
	Markdown         MarkdownConfig   `toml:"markdown"`
	ContentDirectory string           `toml:"content_directory"`
	OutputDirectory  string           `toml:"output_directory"`
	IncludeDrafts    bool             `toml:"include_drafts"`
	Sitemap          bool             `toml:"sitemap"`
	PreBuildCmd      string           `toml:"prebuild"`
	PostBuildCmd     string           `toml:"postbuild"`
	ServerConfig     ServerConfig     `toml:"server"`
	DevMode          bool
	// contains filtered or unexported fields
}

func Load

func Load(filename string) (*Config, error)

func (*Config) ContentDirectoryAbsolute

func (c *Config) ContentDirectoryAbsolute() string

func (*Config) OutputDirectoryAbsolute

func (c *Config) OutputDirectoryAbsolute() string

func (*Config) RootDirectory

func (c *Config) RootDirectory() string

type ContentFeed

type ContentFeed struct {
	Name    string `toml:"name"`
	Title   string `toml:"title"`
	Include string `toml:"include"`
	Exclude string `toml:"exclude"`
}

func (ContentFeed) Exclusions

func (cf ContentFeed) Exclusions() []string

func (ContentFeed) IncludeAllInitially

func (cf ContentFeed) IncludeAllInitially() bool

func (ContentFeed) Inclusions

func (cf ContentFeed) Inclusions() []string

type MarkdownConfig

type MarkdownConfig struct {
	HighlightCode    bool `toml:"highlight_code"`
	SmartPunctuation bool `toml:"smart_punctuation"`
}

type ServerConfig

type ServerConfig struct {
	Port        int64    `toml:"port"`
	WatchIgnore []string `toml:"watch_ignore"`
}

type TaxonomyConfig

type TaxonomyConfig struct {
	Name       string `toml:"name"`
	Feed       bool   `toml:"feed"`
	PaginateBy int    `toml:"paginate_by"` // Add this field for optional pagination
}

Jump to

Keyboard shortcuts

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