Open alexdean opened 11 years ago
I use files with the .html.md
extension and the following in my controller.rb
:
# preprocess markdown files through ERB first, in order to use helpers, etc
before /\.md$/ do
template_erb = Tilt::ERBTemplate.new(_stasis.path)
out = template_erb.render(self)
template_md = Tilt['md'].new{ out }
instead template_md.render(self)
end
I'd like to be able to author blog posts in markdown, but sprinkle in a few helper calls here and there. Does stasis support any way to embed some ruby snippets in a markdown file?