hugo

package
v0.0.0-...-baa2fd7 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KeyNotFoundError   = errors.New("key not set")
	KeyConversionError = errors.New("failed to convert key type")
)

Functions

func GetBool

func GetBool(matter *pageparser.ContentFrontMatter, key string) (bool, error)

func GetContentPath

func GetContentPath(content string) (string, error)

func GetString

func GetString(matter *pageparser.ContentFrontMatter, key string) (string, error)

func ParsePage

func ParsePage(pagePath string) (pageparser.ContentFrontMatter, error)

func WritePage

func WritePage(w io.WriteCloser, page *pageparser.ContentFrontMatter) error

Types

type Config

type Config struct {
	CacheDir    string
	ConfigDir   string
	ConfigFile  string
	Environment string
	PublishDir  string
	ThemesDir   string
	WorkingDir  string
}

type ConfigOption

type ConfigOption interface {
	Apply(config *Config) error
}

type ConfigOptionFn

type ConfigOptionFn func(config *Config) error

func (ConfigOptionFn) Apply

func (fn ConfigOptionFn) Apply(config *Config) error

type Sites

type Sites struct {
	*hugolib.HugoSites
	ContentFactory hugolib.ContentFactory
}

func New

func New(options ...ConfigOption) (*Sites, error)

Jump to

Keyboard shortcuts

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