Skip to main content

Module template

Module template 

Source
Expand description

Shared Tera engine + context builders.

Two contexts:

  • config_context — exposes only yui.* and the env(name=…) function. Used while parsing config*.toml (vars aren’t fully resolved yet).
  • template_contextyui.* + vars.* + env(…). Used to render *.tera dotfiles after the merged config is known.

Structs§

Engine

Functions§

config_context
config_render_context
template_context plus self-referencing placeholders for the hook script vars (script_path / script_dir / script_name / script_stem / script_ext). Use this only for the config-load Tera pass, where those tokens haven’t been bound yet but should survive verbatim so the hook executor can resolve them at run time.
eval_truthy
Evaluate a Tera expression as a truthy/falsy boolean. Accepts either a bare expression (yui.os == 'linux') or a pre-wrapped one ({{ yui.os == 'linux' }}); used wherever the user writes a when condition (mount entry, render rule, marker link, file-header).
template_context