mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-31 01:38:24 -05:00
Have separate methods for all docs and just the docs that are being written.
This commit is contained in:
@@ -405,7 +405,7 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
def documents
|
||||
def docs_to_write
|
||||
collections.reduce(Set.new) do |docs, (_, collection)|
|
||||
if collection.write?
|
||||
docs.merge(collection.docs)
|
||||
@@ -415,8 +415,14 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
def documents
|
||||
collections.reduce(Set.new) do |docs, (_, collection)|
|
||||
docs.merge(collection.docs)
|
||||
end
|
||||
end
|
||||
|
||||
def each_site_file
|
||||
%w(posts pages static_files documents).each do |type|
|
||||
%w(posts pages static_files docs_to_write).each do |type|
|
||||
send(type).each do |item|
|
||||
yield item
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user