lib/blogdown/file_pipeline.rb in blogdown-0.1.2 vs lib/blogdown/file_pipeline.rb in blogdown-0.2.0
- old
+ new
@@ -10,22 +10,24 @@
load_files
end
# @return [Array] The files under posts folder
def load_files
- base_input=@root+'/posts'
+ puts "loading files from #{@root.to_s}"
+ base_input=@root
base=Pathname.new(base_input)
unless base.exist?
raise Blogdown::Exceptions::DirectoryNotFound, "please make sure the posts folder is present"
end
if base.exist?
base.each_child do|child|
- if child.basename.to_s=~/^*.md$/
+ puts "loading #{child.to_s}"
self.stack<<child
- end
+ puts "Done"
end
end
+ puts "Finished loading #{self.stack.length} files"
end
# Writes given contents into a file with a name given as a parameter
# @param name [String] The name of the file to be written
# @param contents [String] The contents to be written on the file
\ No newline at end of file