Have separate methods for all docs and just the docs that are being written.
This commit is contained in:
parent
693d1b84a8
commit
a2169bf0c4
|
@ -405,7 +405,7 @@ module Jekyll
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def documents
|
def docs_to_write
|
||||||
collections.reduce(Set.new) do |docs, (_, collection)|
|
collections.reduce(Set.new) do |docs, (_, collection)|
|
||||||
if collection.write?
|
if collection.write?
|
||||||
docs.merge(collection.docs)
|
docs.merge(collection.docs)
|
||||||
|
@ -415,8 +415,14 @@ module Jekyll
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def documents
|
||||||
|
collections.reduce(Set.new) do |docs, (_, collection)|
|
||||||
|
docs.merge(collection.docs)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def each_site_file
|
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|
|
send(type).each do |item|
|
||||||
yield item
|
yield item
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue