Permalink
Browse files

Merge commit '01828dada88a6ce2ebd72268c87d79d7bd60a3fd'

  • Loading branch information...
2 parents 9e764a6 + 01828da commit 1e13d2f91f58c21b2737d69af98dcbe2a4f92c2c @mojombo mojombo committed Dec 11, 2008
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/jekyll/site.rb
View
7 lib/jekyll/site.rb
@@ -54,7 +54,7 @@ def read_posts
base = File.join(self.source, "_posts")
entries = Dir.entries(base)
entries = entries.reject { |e| File.directory?(e) }
-
+
entries.each do |f|
self.posts << Post.new(base, f) if Post.valid?(f)
end
@@ -85,9 +85,10 @@ def transform_pages(dir = '')
base = File.join(self.source, dir)
entries = Dir.entries(base)
entries = entries.reject { |e| ['.', '_'].include?(e[0..0]) }
-
+
entries.each do |f|
if File.directory?(File.join(base, f))
+ next if self.dest.sub(/\/$/, '') == File.join(base, f)
transform_pages(File.join(dir, f))
else
first3 = File.open(File.join(self.source, dir, f)) { |fd| fd.read(3) }
@@ -114,4 +115,4 @@ def site_payload
end
end
-end
+end

0 comments on commit 1e13d2f

Please sign in to comment.