Stacked templates in Sinatra

84 views Asked by At

Does Sinatra has a built-in way to do stacked Tilt templates, in the way that Sprockets do?

So that I could, for example, have

document.erb.markdown

to have the document first go from Markdown to HTML with ERB injections, and from there on to HTML via ERB eval? Something like

get '/document' do
  render_stacked :document
end

And still render it using a built-in method?

1

There are 1 answers

0
Aleksei Matiushkin On BEST ANSWER

Out of the box Sinatra does not have such an option, but there are a lot of workarounds on github. Original one, AFAIK, is this.

Google search should help you [to find](sinatra asset pipeline) a suitable for you.