Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapWithConfig ¶
func WrapWithConfig(c *cli.Context, action func(*cli.Context, *Configuration) error) error
WrapWithConfig
Types ¶
type Configuration ¶
type Configuration struct { Title string `json:"title" yaml:"title"` Description string `json:"description" yaml:"description"` Url string `json:"url" yaml:"url"` FeedLimit int `json:"feedLimit" yaml:"feed_limit"` Author string `json:"author" yaml:"author"` ServePort int `json:"servePort" yaml:"serve_port"` Paths struct { Root string `json:"root" yaml:"root"` Posts string `json:"posts" yaml:"posts"` Authors string `json:"authors" yaml:"authors"` Tags string `json:"tags" yaml:"tags"` Templates string `json:"templates" yaml:"templates"` Files string `json:"files" yaml:"files"` } `json:"paths" yaml:"paths"` Mappings []*Mapping `json:"mappings" yaml:"mappings"` }
func (*Configuration) Validate ¶
func (c *Configuration) Validate() (*Configuration, error)
Validate
type Mapping ¶
type Mapping struct { Type TemplateMapType `json:"type" yaml:"type"` Pattern string `json:"pattern" yaml:"pattern"` Input string `json:"input" yaml:"input"` Output string `json:"output" yaml:"output"` Partials []string `json:"partials" yaml:"partials"` }
type TemplateMapType ¶
type TemplateMapType string
const ( Tag TemplateMapType = "tag" Post TemplateMapType = "post" Author TemplateMapType = "author" Page TemplateMapType = "page" Index TemplateMapType = "index" )
Click to show internal directories.
Click to hide internal directories.