override EXCERPT_ATTRIBUTES_FOR_LIQUID

Allow EXCERPT_ATTRIBUTES_FOR_LIQUID to be overridden by inheriting class. Right now will always reference Jekyll::Post::EXCERPT_ATTRIBUTES_FOR_LIQUID. This is already being used in the codebase for ATTRIBUTES_FOR_LIQUID.
This commit is contained in:
Quinn Shanahan
2014-05-14 11:25:44 -04:00
parent 8fc1e4b5ea
commit 5ea62443f4
4 changed files with 24 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ module Jekyll
end
def to_liquid
post.to_liquid(Post::EXCERPT_ATTRIBUTES_FOR_LIQUID)
post.to_liquid(post.class::EXCERPT_ATTRIBUTES_FOR_LIQUID)
end
# Fetch YAML front-matter data from related post, without layout key

View File

@@ -256,7 +256,7 @@ module Jekyll
# construct payload
payload = Utils.deep_merge_hashes({
"site" => { "related_posts" => related_posts(site_payload["site"]["posts"]) },
"page" => to_liquid(EXCERPT_ATTRIBUTES_FOR_LIQUID)
"page" => to_liquid(self.class::EXCERPT_ATTRIBUTES_FOR_LIQUID)
}, site_payload)
if generate_excerpt?