Hi,
I just configured a blog for my Middleman site and generated a test article.
Now I try to list my blog articles in blog.html.erb:
<% blog.articles[0...5].each do |article| %>
<article class="item">
<h2><a href="<%= article.url %>"><%= article.title %></a></h2>
<p class="date">15 May 2016</p>
<div class="line"> </div>
</article>
<% end >
but this is not working for some reason.
I get the error message
SyntaxError at /blog.html
/Users/acandael/Sites/state/source/blog.html.erb:16: syntax error, unexpected keyword_ensure, expecting keyword_end /Users/acandael/Sites/state/source/blog.html.erb:20: syntax error, unexpected end-of-input, expecting keyword_end end;end;end;end
I configured the blog in my config.rb like this:
activate :blog do |blog|
blog.sources = "{year}-{month}-{day}-{title}.html"
blog.permalink = "blog/{title}.html"
blog.prefix = "blog"
end
my version of Middleman is 4.1.8
my repository branch is at:
thanks for your help,
Anthony