mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 09:18:11 -05:00
If title is ommitted from a Post's YAML, use the filename's slug.
This commit is contained in:
committed by
Tom Preston-Werner
parent
4db696152c
commit
feff93c603
@@ -154,7 +154,7 @@ module Jekyll
|
||||
#
|
||||
# Returns <Hash>
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user