prevented _posts from being copied to the destination directory
This commit is contained in:
parent
2569e9fb5e
commit
992c4a8e6f
|
@ -112,8 +112,8 @@ module Jekyll
|
||||||
|
|
||||||
# we need to make sure to process _posts *first* otherwise they
|
# we need to make sure to process _posts *first* otherwise they
|
||||||
# might not be available yet to other templates as {{ site.posts }}
|
# might not be available yet to other templates as {{ site.posts }}
|
||||||
if entries.include?('_posts')
|
if directories.include?('_posts')
|
||||||
entries.delete('_posts')
|
directories.delete('_posts')
|
||||||
read_posts(dir)
|
read_posts(dir)
|
||||||
end
|
end
|
||||||
[directories, files].each do |entries|
|
[directories, files].each do |entries|
|
||||||
|
|
|
@ -29,4 +29,8 @@ class TestGeneratedSite < Test::Unit::TestCase
|
||||||
assert_equal 1, published.size
|
assert_equal 1, published.size
|
||||||
assert_equal "published.html", published.first
|
assert_equal "published.html", published.first
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_posts_directory_not_copied
|
||||||
|
assert !File.exist?(File.join(dest_dir, '_posts'))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue