1TILT(1) Tilt Manual TILT(1)
2
3
4
6 tilt - process templates
7
9 tilt -l
10 tilt [-t pattern] [-y file] [-D name=value] [-d file] [--vars=ruby]
11 file
12
14 Process template file and write output to stdout. With no file or when
15 file is ´-´, read template from stdin and use the --type option to
16 determine the template´s type.
17
19 -l, --list
20 List template engines + file patterns and exit
21
22 -t, --type=pattern
23 Use this template engine; required if no file
24
25 -y, --layout=file
26 Use file as a layout template
27
28 -Dname=value
29 Define variable name as value
30
31 -d, --define-file=file
32 Load YAML or JSON from file and use for variables
33
34 --vars=ruby
35 Evaluate ruby to Hash and use for variables
36
37 -h, --help
38 Show this help message
39
41 Convert markdown to HTML:
42
43
44
45 $ tilt foo.markdown > foo.html
46
47
48
49 Process ERB template:
50
51
52
53 $ echo "Answer: <%= 2 + 2 %>" | tilt -t erb
54 Answer: 4
55
56
57
58 Define variables:
59
60
61
62 $ echo ´{"n":40}´ > data.json
63 $ echo "Answer: <%= 2 + n %>" | tilt -t erb -d data.json
64 Answer: 42
65
66 $ echo "Answer: <%= 2 + n %>" | tilt -t erb --vars="{:n=>40}"
67 Answer: 42
68 $ echo "Answer: <%= 2 + n.to_i %>" | tilt -t erb -Dn=40
69 Answer: 42
70
71
72
74 m4(1), mustache(1)
75
76
77
78Tilt 2.0.8 July 2019 TILT(1)