Embedded Hammar Script

Hammar template files, located under /templates in the templates, can contain elements of Embedded Hammar Script which is small sections of Hammar Script that either apply conditions to sections, produce direct output, or in some other way alter the file as it is being put in place.

Embedded Hammar Script is introduced by using EHS tokens like this:

# Config file
SETTING=5
{{EHS}}
if spoils['othersetting'] is not None:
print("setting=", EHS=spoils['othersetting'])
{{EHS-END}}

There is also a short syntax for inserting a spoils or variables:

The value of variable is {{variable}}