Skip to content

Commit

Permalink
Updating documentation for Convertible#do_layout
Browse files Browse the repository at this point in the history
Making it clear that this method doesn't just work on posts
  • Loading branch information
JackDanger committed Dec 10, 2008
1 parent 3840380 commit 96bf21d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/jekyll/convertible.rb
Expand Up @@ -34,15 +34,14 @@ def transform
end
end

# Add any necessary layouts to this post
# Add any necessary layouts to this convertible document
# +layouts+ is a Hash of {"name" => "layout"}
# +site_payload+ is the site payload hash
#
# Returns nothing
def do_layout(payload, layouts, site_payload)
# construct payload
payload = payload.merge(site_payload)

# render content
self.content = Liquid::Template.parse(self.content).render(payload, [Jekyll::Filters])
self.transform
Expand All @@ -60,4 +59,4 @@ def do_layout(payload, layouts, site_payload)
end
end
end
end
end

0 comments on commit 96bf21d

Please sign in to comment.