문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top