config

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigTemplate = `` /* 1035-byte string literal not displayed */

Variables

This section is empty.

Functions

func CreateDefaultConfig

func CreateDefaultConfig(path, documentsDir, partialsDir, outputDir string, force bool) error

Types

type Config

type Config struct {
	Paths    Paths          `yaml:"paths"`
	MJML     MJMLConfig     `yaml:"mjml"`
	Template TemplateConfig `yaml:"template"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

type MJMLConfig

type MJMLConfig struct {
	ValidationLevel string            `yaml:"validationLevel"`
	KeepComments    bool              `yaml:"keepComments"`
	Beautify        bool              `yaml:"beautify"`
	Minify          bool              `yaml:"minify"`
	Fonts           map[string]string `yaml:"fonts"`
}

type Paths

type Paths struct {
	Documents string `yaml:"documents"`
	Partials  string `yaml:"partials"`
	Output    string `yaml:"output"`
}

type TemplateConfig

type TemplateConfig struct {
	Variables map[string]any `yaml:"variables"`
	Documents map[string]any `yaml:"documents"`
}

Jump to

Keyboard shortcuts

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