If title is ommitted from a Post's YAML, use the filename's slug.

This commit is contained in:
Basil Shkara 2008-12-27 18:03:43 +11:00 committed by Tom Preston-Werner
parent 4db696152c
commit feff93c603
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ module Jekyll
# #
# Returns <Hash> # Returns <Hash>
def to_liquid def to_liquid
{ "title" => self.data["title"] || "", { "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,