tilt(1)

tilt1

Generic interface to multiple ruby template engines

Usage

tilt <options> <file>

Overview

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

-l, --list

List template engines + file patterns and exit

-t, --type=<pattern> Use this template engine; required if no <file>

-y, --layout=<file>

Use <file> as a layout template

-D<name>=<value>

Define variable <name> as <value>

-o, --vars=<ruby>

Evaluate <ruby> to Hash and use for variables

-h, --help

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 --locals="{:n=>40, :x=>0}" Answer: 42 $ echo "Answer: <%= 2 + n %>" | tilt -Dn=40 -Dx=0 Answer: 42

Releases

Unchanged in 7 releases since Debian 7 (Wheezy).

  1. 7–13

From ruby-tilt 2.4.0-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.