Chuck,
Makes sense to me as it took me a bit of time to wrap my head around the way middleman works… the doc’s have a few holes in them if your not fully ingrained into the way middleman works. I’m heading to work shortly so I’m sure this isn’t going to come off as clear as I hope.
Please assume post[ing] and article are essential the same here. I think of a blog entry as a post, and a non-blog page as an article…
The basic shipped getting started layout runs everything thru the source/layout.erb template. You have a few different choices how you could proceed. You could put some logic in the default layout to pull some data out of the frontmatter you could make a separate template or you could use a partial like layout with layout_wrap
that is then embedded into the default layout.
Since I was/am moving from jekyll to middleman everyone of my postings had layout: post
in the frontmatter so I chose to create a new layout called post.erb
in source/layouts and do something like:
<% wrap_layout :layout do %>
<%= partial "_post_entry", locals: {post: current_article} %>
<% end %>
the the partial _post_entry
preforms the layout for both the main page along with the individual posting pages. I’m sure this had some flaws but it works for me, for now… oh… and to grab the data in the frontmatter you would do something like:
<%= current_article.data.title %>
<%= current_article.date.strftime('%b %d') %>
I hope this helps with your question.