My config.rb already has a layout defined (while named layout, it has the blog markup). It’s the only layout file I have in use right now.
Here is my blog activation block:
activate :blog do |blog|
blog.sources = "articles/:year/:month/:day-:title.html"
blog.layout = "layout"
blog.new_article_template = "source/articles/article.tt"
blog.tag_template = "tag.html"
blog.calendar_template = "calendar.html"
# Enable pagination
blog.paginate = true
blog.per_page = 10
blog.page_link = "page/{num}"
blog.custom_collections = {
category: {
link: 'categories/{category}.html',
template: 'category.html'
}
}
end
This layout is being properly wrapped around my listing page (which is using index.html.erb), my tags page (tags.html.erb), and my categories page (categories.html.erb). What isn’t working is when I click into the detail of a blog post/article what is showing isn’t correct, it’s just outputting the article body.
My question was, is middleman-blog using a file like index.html.erb that I can specify in the activation configuration and style accordingly? Something like article.html.erb?
So to summarize:
- Navigating to http://localhost:4567/ renderings my blog layout properly, uses index.html.erb to show a listing page. These articles are intentionally truncated (and paged).
- Navigating to http://localhost:4567/2012/01/01/example-article/ however renders the article wrapped in the proper layout but does not display the article correctly (just showing body).
Hope that helps explain my issue a bit better. I’ve actually received your suggestion twice now (co-worker suggested this: https://gist.github.com/jzajac/9571ace9b1d673989397.
Thanks!