Stash documents `write?` attribute in a variable (#8389)
Merge pull request 8389
This commit is contained in:
parent
c9ab616ace
commit
bd04997fee
|
@ -352,7 +352,9 @@ module Jekyll
|
||||||
# method returns true, and if the site's Publisher will publish the document.
|
# method returns true, and if the site's Publisher will publish the document.
|
||||||
# False otherwise.
|
# False otherwise.
|
||||||
def write?
|
def write?
|
||||||
collection&.write? && site.publisher.publish?(self)
|
return @write_p if defined?(@write_p)
|
||||||
|
|
||||||
|
@write_p = collection&.write? && site.publisher.publish?(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
# The Document excerpt_separator, from the YAML Front-Matter or site
|
# The Document excerpt_separator, from the YAML Front-Matter or site
|
||||||
|
|
Loading…
Reference in New Issue