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 $@

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

···

On Wed, Feb 12, 2014 at 8:36 AM, gvim <gvimrc@gmail.com> wrote:

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 $@

Do you mean a static website generator in Ruby?

I did not understand the explanation completely.

···

--
Posted via http://www.ruby-forum.com/.

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

···

On 13/02/2014 13:15, Marc Heiler wrote:

Do you mean a static website generator in Ruby?

I did not understand the explanation completely.