I do not like these big chained if expressions
Maybe this can be better like that:

```ruby
if File.file?(path) && path.sub(source, '') !~ /\/_/
  klass = if path =~ /_posts/
    Post
  elsif path =~ /_drafts/ && show_drafts
    Draft
  elsif has_yaml_header?(path)
    Page
  else
    StaticFile
  end
  files << klass.new(self, path)
elsif path =~ /#{config['layouts']}/
   ext = File.extname(path)
   name = File.basename(path, ext)
   layouts[name] = Layout.new(self, path)
end   
```

It will reduce a little the [cyclomatic complexity](http://en.wikipedia.org/wiki/Cyclomatic_complexity) of this statement (I'd manually calculated it, it became 2 paths less than the old one), and makes the code more simple to understand in my opinion...