Scroll to navigation

TILT(1) tilt TILT(1)

NAME

tilt - Generic interface to multiple Ruby template engines

SYNOPSIS

tilt <options> <file>

DESCRIPTION

Process template <file> and write output to stdout. With no <file> or when <file> is '-', read template from stdin and use the --type option to determine the template's type.

Options

List template engines + file patterns and exit
Use this template engine; required if no <file>
Use <file> as a layout template
Define variable <name> as <value>
Load YAML from <file> and use for variables
Evaluate <ruby> to Hash and use for variables
Show this help message

Convert markdown to HTML:

$ tilt foo.markdown > foo.html

Process ERB template:

$ echo "Answer: <%= 2 + 2 %>" | tilt -t erb
Answer: 4

Define variables:

$ 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
December 2026 tilt 2.10.0