make frontmatter defaults available to liquid
This commit is contained in:
parent
b3fdaa9792
commit
9d44d3290b
|
@ -13,6 +13,7 @@ require 'set'
|
||||||
# self.ext=
|
# self.ext=
|
||||||
# self.output=
|
# self.output=
|
||||||
# self.name
|
# self.name
|
||||||
|
# self.type -> :page, :post or :draft
|
||||||
module Jekyll
|
module Jekyll
|
||||||
module Convertible
|
module Convertible
|
||||||
# Returns the contents as a String.
|
# Returns the contents as a String.
|
||||||
|
@ -91,7 +92,8 @@ module Jekyll
|
||||||
further_data = Hash[(attrs || self.class::ATTRIBUTES_FOR_LIQUID).map { |attribute|
|
further_data = Hash[(attrs || self.class::ATTRIBUTES_FOR_LIQUID).map { |attribute|
|
||||||
[attribute, send(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
|
end
|
||||||
|
|
||||||
# Recursively render layouts
|
# Recursively render layouts
|
||||||
|
|
Loading…
Reference in New Issue