Suggestion: 'render' vanilla HTML

9 views
Skip to first unread message

David

unread,
May 12, 2010, 7:44:35 PM5/12/10
to Tilt
I have a small suggestion. I’d like an option for HTML templates. This
may seem counterintuitive, but hear me out.

I’m writing a library that uses Tilt to render HTML (both for layouts
a la HAML, etc., and for content via Markdown/Textile). My library’s
interface is going to be template-agnostic, like Tilt.

Now, it’s possible that a user will want to use an HTML file as a
layout and only wants to render the content. I know that I could
probably:

1. bind .html files to the ERB engine or
2. handle this condition in my library

But it would be really nice to have this feature embedded in Tilt
itself. I’m thinking this isn’t too much to ask, since Tilt is billed
as the template-agnostic renderer. Doing this would give applications
a nice, unified interface for *all* types of layouts, and not just
templating languages.

What do you guys think?

Best,
David

Ryan Tomayko

unread,
May 13, 2010, 11:13:44 AM5/13/10
to til...@googlegroups.com
It's a good idea. We actually had something similar to what you've described:

http://github.com/rtomayko/tilt/commit/37a3185ff926b50578e597b

But it was reverted in f6928eb -- see the comments on the first commit
for why. We're hoping to have a generic VerbatimTemplate instead of
special casing HTML. Does that seem like it would fit your needs?

Ryan

David

unread,
May 13, 2010, 1:05:53 PM5/13/10
to Tilt
On May 13, 11:13 am, Ryan Tomayko <r...@tomayko.com> wrote:
I agree with the discussion on 78e597b, a VerbatimTemplate would be
great.

David

unread,
Jul 3, 2010, 12:23:38 AM7/3/10
to Tilt
Any idea when a VerbatimTemplate is going to be added to the trunk?
Reply all
Reply to author
Forward
0 new messages