Documentation ¶
Index ¶
- Variables
- func Execute(sites []*Site, log *ui.UI) errors.Error
- func GetTemplateTree(template string) *parse.Tree
- func PostProcess(sites *[]*Site, spps []string, log *ui.UI) errors.Error
- func RemoveTemplate(path string)
- type ConfigSite
- type DPP
- type Data
- type DataLoader
- type DataParser
- type DataPostProcessor
- type Iterator
- type IteratorData
- type SPP
- type Site
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrNoDataLoaderFound means a data loader does not have a function ErrNoDataLoaderFound = errors.NewError("could not get data loader information", 1) //ErrNoDataParserFound means a data parser does not have a function ErrNoDataParserFound = errors.NewError("could not get data parser information", 2) //ErrNoDataPostProcessorFound means a data post processor does not have a function ErrNoDataPostProcessorFound = errors.NewError("could not get data post processor information", 3) //ErrNoRangeVariable means a data range attribute does not specify a variable ErrNoRangeVariable = errors.NewError("could not get variable for range", 3) )
View Source
var ( //TemplateFunctions are all the template functions defined by modules TemplateFunctions = template.FuncMap{} //DataLoaders are all the module data loaders DataLoaders = make(map[string]DataLoader) //DataParsers are all the module file parsers DataParsers = make(map[string]DataParser) //DataPostProcessors are all the module data post processors DataPostProcessors = make(map[string]DPP) //SPPs are all the module site post processors SPPs = make(map[string]SPP) //Iterators are all the module iterators Iterators = make(map[string]Iterator) //TemplateFolder is the folder all templates are stored TemplateFolder string //StaticFolder is the folder all static files are stored StaticFolder string //OutputFolder is the folder that should be exported to OutputFolder string //ErrFailedTemplate is when the template failed building ErrFailedTemplate = errors.NewError("failed building template", 1) //ErrFailedStatic is for a failure moving the static folder ErrFailedStatic = errors.NewError("failed to move static folder", 2) //ErrFailedGather is for a failure in gathering files. ErrFailedGather = errors.NewError("failed to gather files", 3) //ErrFailedCreateFS is for a failure in gathering files. ErrFailedCreateFS = errors.NewError("couldn't create directory/file", 4) //ErrUsingUnknownModule is when a user uses a module that is not registered. ErrUsingUnknownModule = errors.NewError("module is used but not registered", 5) )
View Source
var ( //ErrNoIteratorFound means an iterator does not have a function ErrNoIteratorFound = errors.NewError("could not get iterator information", 11) )
Functions ¶
func GetTemplateTree ¶ added in v0.13.0
GetTemplateTree gets the template according to
func PostProcess ¶ added in v0.10.0
PostProcess all sites
func RemoveTemplate ¶ added in v0.13.0
func RemoveTemplate(path string)
Cleans a template from the template cache
Types ¶
type ConfigSite ¶
type ConfigSite struct { Iterators map[string]IteratorData `json:"iterators,omitempty"` Slug string `json:"slug,omitempty"` Templates []string `json:"templates,omitempty"` Data []Data `json:"data,omitempty"` Sites []ConfigSite `json:"sites,omitempty"` IteratorValues map[string]string `json:"-"` Dependencies []string `json:"-"` }
ConfigSite is the way a site is defined in the config file
func DeepCopy ¶ added in v0.13.0
func DeepCopy(cSite ConfigSite) ConfigSite
DeepCopy deep copies the site.
func Unfold ¶
func Unfold(configSite *ConfigSite, log *ui.UI) ([]ConfigSite, errors.Error)
Unfold the ConfigSite into a []ConfigSite
type Data ¶ added in v0.9.2
type Data struct { ShouldRange string Loader string LoaderArguments string Parser string ParserArguments string PostProcessors []DataPostProcessor }
Data is info about data from the config
func (*Data) MarshalJSON ¶ added in v0.9.2
MarshalJSON marshalls the data
func (*Data) UnmarshalJSON ¶ added in v0.9.2
UnmarshalJSON unmarshalls the data
type DataLoader ¶ added in v0.9.0
DataLoader is a module that loads data
type DataParser ¶ added in v0.9.0
DataParser is a module that parses loaded data
type DataPostProcessor ¶ added in v0.9.2
DataPostProcessor is info about a data post processor from the config
type IteratorData ¶ added in v0.9.2
IteratorData is info about an iterator from the config
func (IteratorData) MarshalJSON ¶ added in v0.9.2
func (i IteratorData) MarshalJSON() ([]byte, error)
MarshalJSON marshalls the iterator data
func (IteratorData) String ¶ added in v0.9.2
func (i IteratorData) String() string
func (*IteratorData) UnmarshalJSON ¶ added in v0.9.2
func (i *IteratorData) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshalls the iterator data
Click to show internal directories.
Click to hide internal directories.