Skip to content

Commit

Permalink
Allow rendering of BlogArticle without any layout
Browse files Browse the repository at this point in the history
`article.render` -> Render with default layout
`article.render(layout: nil)` -> Force rendering without any layout
  • Loading branch information
Soulou committed Feb 8, 2015
1 parent a1a34b6 commit 5d03a09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/middleman-blog/blog_article.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def blog_options
# Called automatically by Middleman.
# @return [String]
def render(opts={}, locs={}, &block)
if opts[:layout].nil?
if !opts.has_key?(:layout)
opts[:layout] = metadata[:options][:layout]
opts[:layout] = blog_options.layout if opts[:layout].nil?
# Convert to a string unless it's a boolean
Expand Down

0 comments on commit 5d03a09

Please sign in to comment.