TILT(1)

πŸ“¦
version 2.8.0 Β· 2 versions
  • 2.8.0 Β· debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 2.0.10 Β· epel 9
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ TILT(1) β€” the tilt manual, bestie edition πŸŽ€

okay so. this is the manual page for tilt, aka your generic interface to multiple Ruby template engines. yes queen, one lil command, ALL the engines. we're doing this together, grab a snack πŸ“


✨ NAME ✨

tilt β€” generic interface to multiple Ruby template engines πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

tilt <options> <file>

that's it. that's the whole vibe check. <options> go in, <file> goes in, magic comes out ✨


🌸 DESCRIPTION 🌸

so what does it do? it processes the template <file> and writes the output straight to stdout. periodt.

and if you pass no <file> at all, or your <file> is literally just -, then it reads the template from stdin instead, and you have to use the --type option so it knows what kind of template it's looking at. no type, no clue, bestie. 🫢


πŸ’– OPTIONS πŸ’–

here's the whole menu, nothing skipped, all of it iconic:

  • -l, --list β€” list the template engines + their file patterns, then dip out and exit. window shopping only πŸ›οΈ
  • -t, --type=<pattern> β€” use this template engine. required if there's no <file> (see above, i warned you)
  • -y, --layout=<file> β€” use <file> as a layout template. the outer aesthetic, if you will πŸŽ€
  • -D<name>=<value> β€” define the variable <name> as <value>. little variable, big main character energy
  • -o, --vars=<ruby> β€” evaluate <ruby> into a Hash and use that for the variables. yes, ruby-in-ruby, we love a nesting moment πŸͺ†
  • -h, --help β€” show this help message. hi, hello, here's the tea β˜•

🌈 Convert markdown to HTML:

$ tilt foo.markdown > foo.html

markdown in, html out, slay πŸ’…

🌈 Process ERB template:

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

piping it in from stdin and telling it -t erb because no file = you must declare the type, remember? and boom: 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

two ways to feed the variables, one iconic answer: Answer: 42 ✨ (also -Dn=40 -Dx=0 is the short-flag flex, iykyk)


ngl bestie, this whole thing is literally a lil translator between you and every Ruby template engine out there. treat it nice and it treats you nicer πŸ’œ

and that's the whole page!! this was tilt 1.3.2, dated July 2011 β€” vintage but still serving, fr fr. mwah, go write some templates πŸ¦‹πŸ’–πŸŽ€

πŸ“¦ where this page comes from