config

package
v0.0.0-...-dccbc30 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfiguration = &Configuration{
	UnsafeVars:   false,
	BuildDir:     "build",
	SrcDir:       "src",
	RootLanguage: "en",
	Languages: []string{
		"en",
	},
	ServeConfig: ServeConfiguration{
		Redirect404: "",
		Port:        8100,
	},
	LanguageMode: "unique",
	HTMLDir:      "html",
	VarsDir:      "html/vars",
	BuilderConfig: map[string]map[string]string{
		"css": {
			"ext":       ".css",
			"folder":    "css",
			"vars_file": "config.json",
		},
		"vendor": {
			"folder": "vendor",
		},
		"assets": {
			"folder": "assets",
		},
		"html": {
			"ext": ".html",
		},
		"javascript": {
			"folder": "js",
			"ext":    ".js",
		},
	},
}

Functions

func Init

func Init(configpath string) error

Types

type Configuration

type Configuration struct {
	UnsafeVars    bool                         `json:"unsafe_vars,omitempty"`
	BuildDir      string                       `json:"build_directory,omitempty"`
	SrcDir        string                       `json:"source_directory,omitempty"`
	HTMLDir       string                       `json:"html_directory,omitempty"`
	VarsDir       string                       `json:"vars_directory,omitempty"`
	RootLanguage  string                       `json:"root_language,omitempty"`
	Languages     []string                     `json:"languages,omitempty"`
	LanguageMode  string                       `json:"language_mode,omitempty"`
	BuilderConfig map[string]map[string]string `json:"builder_config,omitempty"`
	ServeConfig   ServeConfiguration           `json:"serve_config,omitempty"`
}

type ServeConfiguration

type ServeConfiguration struct {
	Redirect404 string `json:"redirect_404"`
	Port        int    `json:"port"`
}

Jump to

Keyboard shortcuts

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