If title is ommitted from a Post's YAML, use the filename's slug.
This commit is contained in:
parent
4db696152c
commit
feff93c603
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue