Hi, I've been writing blog posts in Middleman as .md files. Now I have a helper that I need to use in posts, so I'm converting to .md.erb.
When there is Erb code in a syntax highlighting block however, the engine wants to evaluate it and page rendering fails (eg with "undefined method `each' for nil:NilClass"):
<% code("erb") do %>
<!-- app/views/posts/index.html.erb -->
<ul>
<% @posts.each do |post| %> <<<< error
<li>
<%= post.title %><br />
<%= post.content %>
</li>
<% end %>
<ul>
<% end %>
Hi, I've been writing blog posts in Middleman as
.md
files. Now I have a helper that I need to use in posts, so I'm converting to.md.erb
.When there is Erb code in a syntax highlighting block however, the engine wants to evaluate it and page rendering fails (eg with "undefined method `each' for nil:NilClass"):
This is my current Middleman
config.rb
: https://gist.github.com/markoa/6534662If you have any idea what I'm doing wrong, please help.