Liquify documents unless published == false (#6959)

Merge pull request 6959
This commit is contained in:
Ashwin Maroli
2018-05-01 20:34:38 +05:30
committed by jekyllbot
parent 5b37555835
commit b22e281bc5
2 changed files with 79 additions and 6 deletions

View File

@@ -210,12 +210,9 @@ module Jekyll
private
def read_document(full_path)
docs << Document.new(full_path, :site => site, :collection => self).tap do |doc|
doc.read
if !site.publisher.publish?(doc) && site.publisher.hidden_in_the_future?(doc)
Jekyll.logger.debug "Skip Publishing:", "#{doc.relative_path} has a future date"
end
end
doc = Document.new(full_path, :site => site, :collection => self)
doc.read
docs << doc unless doc.data["published"] == false
end
private