mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
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:
@@ -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
|
||||
|
||||
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user