Documentation ¶
Index ¶
Constants ¶
View Source
const GenerateFile = "generate.yaml"
GenerateFile the file name of the generator config
View Source
const (
// SectionFileName name of the section file
SectionFileName = "section.yaml"
)
View Source
const SiteFile = "siteconfig.yaml"
SiteFile the default filename of the site config file
View Source
const (
// WssgFolder folder name for the configuration
WssgFolder = ".wssg"
)
Variables ¶
View Source
var ( // PageDefault the page default config PageDefault = Page{ Title: "{{.name}}", Name: "{{.name}}", Processor: processors.DefaultProcessor, } )
View Source
var SectionDefault = Section{ Name: "{{.name}}", Title: "{{.name}}", Processor: processors.DefaultProcessor, }
SectionDefault the default configuration of a section, used for creating a new one
View Source
var SiteDefault = Site{ BaseURL: "example.com", Title: "example", Description: "a short description of this site", Keywords: "tutorial basic static website", Language: "en", UserProperties: objx.Map{ "font": "Tahoma, Verdana, sans-serif", "webcontact": map[string]string{ "url": "mailto:info@example.com", "title": "info@example.com", }, "socialmedia": map[string]any{ "facebook": map[string]string{ "title": "FB", "url": "https://www.facebook.com/wilfried.klaas/", }, "youtube": map[string]string{ "title": "YT", "url": "https://www.youtube.com/channel/UCg5ZpZJGuLgz4maETfUc9EA", }, }, "cookiebanner": map[string]any{ "enabled": false, "text": "", }, }, }
SiteDefault the default of the site configuration
Functions ¶
This section is empty.
Types ¶
type Generate ¶
type Generate struct { // Output where to output the generated site files Output string `yaml:"output"` // Processors conect mime types with processors ProcMime map[string]string `yaml:"procmime"` // Autoreload script Autoreload string `yaml:"autoreload"` // force forces to create everything newly Force bool `yaml:"force"` }
Generate the configuration for the generator
var ( // GenDefault the default generator config GenDefault = Generate{ Output: fmt.Sprintf("./%s/output", WssgFolder), ProcMime: map[string]string{ "text/html": "plain", "text/markdown": "markdown", "text/plain": "plain", }, Autoreload: "", } // GenConfig the actual generator config GenConfig Generate )
func LoadGenConfig ¶
LoadGenConfig loading the generator config from the site
type Page ¶
type Page struct { Title string `yaml:"title"` Name string `yaml:"name"` Processor string `yaml:"processor"` }
Page the configuration of a single page, used by frontmatter
type Section ¶
type Section struct { Name string `yaml:"name"` Title string `yaml:"title"` Processor string `yaml:"processor"` Order int `yaml:"order"` URLPath string UserProperties objx.Map }
Section the configuration of a section
type Site ¶
type Site struct { BaseURL string `yaml:"baseurl"` Title string `yaml:"title"` Description string `yaml:"description"` Keywords string `yaml:"keywords"` Language string `yaml:"language"` UserProperties objx.Map }
Site the configuration struct of the site
var ( // SiteConfig this is the actual main configuration for this site SiteConfig Site )
type Version ¶ added in v0.1.5
type Version struct {
// contains filtered or unexported fields
}
Version the version information
func (*Version) WithCommit ¶ added in v0.1.5
WithCommit setting the commit information fluid
func (*Version) WithVersion ¶ added in v0.1.5
WithVersion setting the version information fluid
Click to show internal directories.
Click to hide internal directories.