Documentation ¶
Index ¶
- func Build(file string)
- func Check(err error)
- func ExtractData(payload string, data Data) (string, error)
- func Help()
- func Init()
- func ProcessContent(template string, content string) string
- func ProcessData(template string, data Data) string
- func ProcessPartials(template string, partials map[string]string) string
- func Serve(file string, port string)
- func WriteCollection(c Collection, config Config, globalData Data) error
- func WritePage(page Page, config Config, globalData Data)
- type Collection
- type Config
- type Data
- type DataLeaf
- type DataList
- type DataNode
- type GenericError
- type Match
- type Page
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractData ¶
Gets a specific datapoint (home.title) from data.
func ProcessContent ¶
Apply content to a template.
func ProcessPartials ¶
Apply partials to a template.
func WriteCollection ¶
func WriteCollection(c Collection, config Config, globalData Data) error
Write collection to dir.
Types ¶
type Collection ¶
type Collection struct { Title string Path string Template string Data map[string]string Posts string }
Collection struct. For each in collections.
type Config ¶
type Config struct { Name string Output string Draft bool Static_src string Static_dest string Global map[string]string Partials map[string]string Pages []Page Collections []Collection }
Config struct. Built from site.yaml.
func ParseConfig ¶
Parse them site.yaml file to get site Config.
type Data ¶
type Data interface {
// contains filtered or unexported methods
}
Data interface - built from YAML data files.
func ExtractList ¶
Gets a specific DataList from data.
func GetDataFromFile ¶
Gets data from a file in the format above.
type GenericError ¶
type GenericError struct {
// contains filtered or unexported fields
}
Generic Error
func (GenericError) Error ¶
func (b GenericError) Error() string
Click to show internal directories.
Click to hide internal directories.