Documentation ¶
Overview ¶
Package config provides types and functions for configuring the core Touch packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = defaultConfig()
Default is the default Config.
Functions ¶
This section is empty.
Types ¶
type Aggregate ¶
type Aggregate struct { Type string // which aggregator (aggregator name) Elements []string // allowed elements to aggregate from }
Aggregate holds aggregator options.
type Aggregates ¶
Aggregates is a map of aggregate names to Aggregates.
type Config ¶
type Config struct { Templates Templates Elements Elements Aggregates Aggregates }
Config holds abstracted options that can be used to configure the core Touch packages.
func ShallowMerge ¶
ShallowMerge merges src into dst but can only add or override whole objects. It does not support more granularity.
type Element ¶
type Element struct { Disabled bool // disabled=as if the element wasn't present Type string // node type or transformer name (e.g. walled, list) Delimiter string // element delimiter Matcher string // prefixed element matcher name (e.g. url) Element string // transformer main element (list element) Target string // transformer target element (sticky target) Option string // extra option (primarily for one-off options) Templates Templates // map of formats to template strings }
Element is an abstraction of parser.Element and transformer options.
type Elements ¶
Elements is a map of element names to Elements.
func (Elements) ParserElements ¶
ParserElements returns the elements with a valid node type converted to parser.Elements.
Click to show internal directories.
Click to hide internal directories.