mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Fix rendering Liquid constructs in excerpts (#6970)
Merge pull request 6970
This commit is contained in:
@@ -9,9 +9,12 @@ module Jekyll
|
||||
attr_writer :output
|
||||
|
||||
def_delegators :@doc, :site, :name, :ext, :extname,
|
||||
:render_with_liquid?, :collection, :related_posts,
|
||||
:collection, :related_posts,
|
||||
:coffeescript_file?, :yaml_file?,
|
||||
:url, :next_doc, :previous_doc
|
||||
|
||||
private :coffeescript_file?, :yaml_file?
|
||||
|
||||
# Initialize this Excerpt instance.
|
||||
#
|
||||
# doc - The Document.
|
||||
@@ -84,6 +87,10 @@ module Jekyll
|
||||
false
|
||||
end
|
||||
|
||||
def render_with_liquid?
|
||||
!(coffeescript_file? || yaml_file? || !Utils.has_liquid_construct?(content))
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
# Internal: Extract excerpt from the content
|
||||
|
||||
Reference in New Issue
Block a user