tilt(1) -- process templates ============================ ## SYNOPSIS `tilt` `-l`
`tilt` [`-t` ] [`-y` ] [`-D` =] [`-d` ] [`--vars=`] ## DESCRIPTION Process template and write output to stdout. With no or when is '-', read template from stdin and use the --type option to determine the template's type. ## OPTIONS * `-l`, `--list`: List template engines + file patterns and exit * `-t`, `--type`=: Use this template engine; required if no * `-y`, `--layout`=: Use as a layout template * `-D`=: Define variable as * `-d`, `--define-file`=: Load YAML or JSON from and use for variables * `--vars`=: Evaluate to Hash and use for variables * `-h`, `--help`: Show this help message ## EXAMPLES Convert markdown to HTML: $ tilt foo.markdown > foo.html Process ERB template: $ echo "Answer: <%= 2 + 2 %>" | tilt -t erb Answer: 4 Define variables: $ echo '{"n":40}' > data.json $ echo "Answer: <%= 2 + n %>" | tilt -t erb -d data.json Answer: 42 $ echo "Answer: <%= 2 + n %>" | tilt -t erb --vars="{:n=>40}" Answer: 42 $ echo "Answer: <%= 2 + n.to_i %>" | tilt -t erb -Dn=40 Answer: 42 ## SEE ALSO m4(1), mustache(1)