pass time object to liquid when time is specified in front matter

This commit is contained in:
lazyeye 2010-01-14 01:10:26 -08:00 committed by Kris Brown
parent e4a2319bf3
commit cfd6ebc747
1 changed files with 3 additions and 2 deletions

View File

@ -201,7 +201,8 @@ module Jekyll
# #
# Returns <Hash> # Returns <Hash>
def to_liquid def to_liquid
{ "title" => self.data["title"] || self.slug.split('-').select {|w| w.capitalize! || w }.join(' '), self.data.deep_merge({
"title" => self.data["title"] || self.slug.split('-').select {|w| w.capitalize! || w }.join(' '),
"url" => self.url, "url" => self.url,
"date" => self.date, "date" => self.date,
"id" => self.id, "id" => self.id,
@ -209,7 +210,7 @@ module Jekyll
"next" => self.next, "next" => self.next,
"previous" => self.previous, "previous" => self.previous,
"tags" => self.tags, "tags" => self.tags,
"content" => self.content }.deep_merge(self.data) "content" => self.content })
end end
def inspect def inspect