make frontmatter defaults available to liquid

This commit is contained in:
maul.esel 2013-09-11 00:55:57 +02:00
parent b3fdaa9792
commit 9d44d3290b
1 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@ require 'set'
# self.ext=
# self.output=
# self.name
# self.type -> :page, :post or :draft
module Jekyll
module Convertible
# Returns the contents as a String.
@ -91,7 +92,8 @@ module Jekyll
further_data = Hash[(attrs || self.class::ATTRIBUTES_FOR_LIQUID).map { |attribute|
[attribute, send(attribute)]
}]
data.deep_merge(further_data)
defaults = site.frontmatter_defaults.all(self.path, self.type)
defaults.merge(data).deep_merge(further_data)
end
# Recursively render layouts