The YAML used in Target Builder is a standard YAML that has been extended with some specific YAML tags.
For initial acquaintance with the YAML read this article: Learn X in Y minutes (Where X=yaml)
In the YAML files, there are two "reserved" fields in the root:
- components (!ref)
- styles (styles)
List of supported tags
- !import, use !include instead
- !variable, use !property instead
!include compile-time tag
- This tag is used to import/include any type of file into this place of YAML.
- This tag supports properties, which correspond to the parameters of this file.
- This tag internally opens any file as string, then processes by EJS (https://ejs.co), and then it passes the contents as a string (for other types) — or processes it by compiler if it is a supported file type (YAML, MD, HTML, LESS).
- You can use EJS for any kind of modifing file that depends on properties, such as—for example-generating some repeating parts of a document or setting values for some of the properties.
- The tag is always processed immediately when is used, except when it is used in the components field in root of YAML file (see !ref).
- The tag is used for including any type of file—not only for YAML but also for LESS, CSS, MD, HTML, etc.
- When you attempt to include a directory, the Target builder will look in this directory for the index.yaml or index.yml file. It will include this file if it is found. Keep in mind that you can include components like !include ./components/button instead of !include ./components/button/index.yml).
Short version (without properties):
Long version (with properties):