.\" generated with Ronn-NG/v0.9.1 .\" http://github.com/apjanke/ronn-ng/tree/0.9.1 .TH "TILT" "1" "February 2023" "" .SH "NAME" \fBtilt\fR \- process templates .SH "SYNOPSIS" \fBtilt\fR \fB\-l\fR .br \fBtilt\fR [\fB\-t\fR \fIpattern\fR] [\fB\-y\fR \fIfile\fR] [\fB\-D\fR \fIname\fR=\fIvalue\fR] [\fB\-d\fR \fIfile\fR] [\fB\-\-vars=\fR\fIruby\fR] \fIfile\fR .SH "DESCRIPTION" Process template \fIfile\fR and write output to stdout\. With no \fIfile\fR or when \fIfile\fR is \'\-\', read template from stdin and use the \-\-type option to determine the template\'s type\. .SH "OPTIONS" .TP \fB\-l\fR, \fB\-\-list\fR List template engines + file patterns and exit .TP \fB\-t\fR, \fB\-\-type\fR=\fIpattern\fR Use this template engine; required if no \fIfile\fR .TP \fB\-y\fR, \fB\-\-layout\fR=\fIfile\fR Use \fIfile\fR as a layout template .TP \fB\-D\fR\fIname\fR=\fIvalue\fR Define variable \fIname\fR as \fIvalue\fR .TP \fB\-d\fR, \fB\-\-define\-file\fR=\fIfile\fR Load YAML or JSON from \fIfile\fR and use for variables .TP \fB\-\-vars\fR=\fIruby\fR Evaluate \fIruby\fR to Hash and use for variables .TP \fB\-h\fR, \fB\-\-help\fR Show this help message .SH "EXAMPLES" Convert markdown to HTML: .IP "" 4 .nf $ tilt foo\.markdown > foo\.html .fi .IP "" 0 .P Process ERB template: .IP "" 4 .nf $ echo "Answer: <%= 2 + 2 %>" | tilt \-t erb Answer: 4 .fi .IP "" 0 .P Define variables: .IP "" 4 .nf $ 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 .fi .IP "" 0 .SH "SEE ALSO" m4(1), mustache(1)