Templating
Templates are a way to define new Wombat components (similar to plugins) that are implemented by generating a Wombat config snippet from pre-defined parameter fields. This is useful when a common pattern of Wombat configuration is used but with varying parameters each time.
How to define and use templates?
A template is defined in a YAML file that can be imported when Wombat runs using the flag -t
:
The template describes the type of the component and configuration fields that can be used to customize it, followed by a Bloblang mapping that translates an object containing those fields into a wombat config structure. This allows you to use logic to generate more complex configurations: