Handlebars Support
Several fields in hermit.toml
support Handlebars syntax for templating. This allows you to dynamically insert values into your configuration.
With Handlebars, you can access contextual information:
dir
this
- The directory of the current hermit.toml filehermit
- The location of the.hermitgrab
directoryhome
- The home of the userxdg_config
- The directory ofXDG_CONFIG_HOME
or its defaultxdg_data
- The directory ofXDG_DATA_HOME
or its defaultxdg_state
- The directory ofXDG_STATE_HOME
or its default
var
- In aninstall
action the variables as specified in the hermit.tomlname
- The name of theinstall
action
tag
- The values of the detected tags as specified in tagsarch
for example might beaarch64
The helper function snippet
allows you to reference the contents of a defined snippet.