From cfd6ebc7478ac2836ba59d34988f4ddd05cc611b Mon Sep 17 00:00:00 2001 From: lazyeye Date: Thu, 14 Jan 2010 01:10:26 -0800 Subject: [PATCH] pass time object to liquid when time is specified in front matter --- lib/jekyll/post.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 1e7238b4..3acfca32 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -201,7 +201,8 @@ module Jekyll # # Returns 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, "date" => self.date, "id" => self.id, @@ -209,7 +210,7 @@ module Jekyll "next" => self.next, "previous" => self.previous, "tags" => self.tags, - "content" => self.content }.deep_merge(self.data) + "content" => self.content }) end def inspect