tdreyno/middleman-blog — Issue #8: Standalone pages alongside of blog
Author: synewaves
Created: 2011-12-06 20:09:44+00:00
State: open

I'm trying to create other standalone pages (in addition to the index page) along with the blog extension. It seems the `is_blog_article?` function returns true for these non-blog pages. I get the following exception:

TypeError at /about.html
can't convert nil into String
file: feature.rb location: parse line: 120

/Users/matt/Web/svn/phaseshift_website/source/_article_template.erb in evaluate_source
<%= current_article_date.strftime('%b %e %Y') %>
/Users/matt/Web/svn/phaseshift_website/source/layout.erb in evaluate_source
<%= partial settings.blog_article_template %>

Here's the excerpt from my `layout.erb` file:

<% if is_blog_article? %>
<% content_for :blog_article, yield %>
<%= partial settings.blog_article_template %>
<% else %>
<%= yield %>
<% end %>

My `_article_template.erb` is as follows:

<%= current_article_title %>
<%= current_article_date.strftime('%b %e %Y') %>

<%= yield_content :blog_article %>