Skip to content

Commit

Permalink
Merge pull request #1928 from jekyll/things-to-content
Browse files Browse the repository at this point in the history
  • Loading branch information
parkr committed Jan 11, 2014
2 parents f3e9eb9 + 6f394e8 commit dd2fa1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/jekyll/site.rb
Expand Up @@ -186,7 +186,7 @@ def read_directories(dir = '')
#
# Returns nothing.
def read_posts(dir)
posts = read_things(dir, '_posts', Post)
posts = read_content(dir, '_posts', Post)

posts.each do |post|
if post.published && (self.future || post.date <= self.time)
Expand All @@ -202,14 +202,14 @@ def read_posts(dir)
#
# Returns nothing.
def read_drafts(dir)
drafts = read_things(dir, '_drafts', Draft)
drafts = read_content(dir, '_drafts', Draft)

drafts.each do |draft|
aggregate_post_info(draft)
end
end

def read_things(dir, magic_dir, klass)
def read_content(dir, magic_dir, klass)
get_entries(dir, magic_dir).map do |entry|
klass.new(self, self.source, dir, entry) if klass.valid?(entry)
end.reject do |entry|
Expand Down

0 comments on commit dd2fa1e

Please sign in to comment.