From feff93c6036f9e0a5b498c8429196883493dfd6f Mon Sep 17 00:00:00 2001 From: Basil Shkara Date: Sat, 27 Dec 2008 18:03:43 +1100 Subject: [PATCH] If title is ommitted from a Post's YAML, use the filename's slug. --- lib/jekyll/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 2cebc0ff..890cae8d 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -154,7 +154,7 @@ module Jekyll # # Returns def to_liquid - { "title" => self.data["title"] || "", + { "title" => self.data["title"] || self.slug.split('-').select {|w| w.capitalize! || w }.join(' '), "url" => self.url, "date" => self.date, "id" => self.id,