From a2169bf0c4170e9dfae53e51ce07d508a745c3a5 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 4 May 2014 21:19:09 -0400 Subject: [PATCH] Have separate methods for all docs and just the docs that are being written. --- lib/jekyll/site.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index ccc6d2c6..3f57a83f 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -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