Ruby equivalent of Template Toolkit (Perl)?

I’ve been using Template Toolkit (Perl) for many years and need
something similar in Ruby to process static html files. In Template
Toolkit I have a config file and a go.sh one-liner (see below) with
which I can recursively process a directory of templates to update a
whole site using ./go.sh -a. What’s the closest to this in the Ruby
templating ecosystem? Erubis didn’t appear to have what I want.

gvim

$ ttree.cfg

src = /var/www/html/mysite/dev/tt/src
lib = /var/www/html/mysite/dev/tt/lib
dest = /var/www/html/mysite/dev/pub

ignore = ^#
ignore = ~$
ignore = .sh$
ignore = .swp$

verbose
recurse
recursion

pre_process = config
wrapper = wrapper

define rootdir = /var/www/html/mysite/dev/

define rooturl =

define debug = 0

suffix sht=html
suffix sph=php
suffix sjs=js
suffix scs=css

expose_blocks


$ go.sh

#!/bin/sh

ttree -f /var/www/html/mysite/dev/tt/ttree.cfg [email protected]

have you looked at jekyll and/or middleman? there are other static
site generators as well in ruby land…

Do you mean a static website generator in Ruby?

I did not understand the explanation completely.

On 13/02/2014 13:15, Marc H. wrote:

Do you mean a static website generator in Ruby?

I did not understand the explanation completely.

Well, both really. I’ve been using Template Toolkit to generate both
static and dynamic HTML but the example scripts I posted were for static
HTML generation.

gvim

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs