Support for non-HTML output #136

Closed
gioele opened this Issue Feb 16, 2012 · 3 comments

Projects

None yet

3 participants

@gioele
gioele commented Feb 16, 2012

Some rendering engines can output non-HTML code, for example Kramdown can output Latex code. It would be nice to have a generic API to set the desired output format.

Support for non-HTML output formats would make Tilt a bit more similar to pandoc or make it easier for Tilt to handle pandoc as a render engine (see issue #99).

Collaborator
judofyr commented Feb 16, 2012

Couldn't any template just take that as an option?

kd = Tilt::KramdownTemplate.new(:format => 'latex')
kd.render

You could. If you wanted that renderer to only render to latex. I think the larger goal would be to have a way to pass the desired output to the renderer. Tools like middleman could pass the next extension to the renderer, for example.

Collaborator
judofyr commented May 1, 2013

Well, many of the template engines are format-agnostic (e.g. ERB) so it wouldn't make sense to have format as a required parameter. And if it's not going to required there's nothing else to do than try to use the format-option consistently across template engines.

@judofyr judofyr closed this May 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment