class Jekyll::PostReader

def read_content(dir, magic_dir, matcher)

Returns klass type of content files

klass - The return type of the content.
looks for content here.
magic_dir - The String relative directory to ,
dir - The String relative path of the directory to read.

and return them with the type klass.
Read all the content files from //magic_dir
def read_content(dir, magic_dir, matcher)
  @site.reader.get_entries(dir, magic_dir).map do |entry|
    next unless matcher.match?(entry)
    path = @site.in_source_dir(File.join(dir, magic_dir, entry))
    Document.new(path,
                 :site       => @site,
                 :collection => @site.posts)
  end.tap(&:compact!)
end