Method: Jekyll::Reader#retrieve_posts
- Defined in:
- lib/ngage/jekyll/reader.rb
#retrieve_posts(dir) ⇒ Object
Retrieves all the posts(posts/drafts) from the given directory and add them to the site and sort them.
dir - The String representing the directory to retrieve the posts from.
Returns nothing.
62 63 64 65 66 67 |
# File 'lib/ngage/jekyll/reader.rb', line 62 def retrieve_posts(dir) return if outside_configured_directory?(dir) site.posts.docs.concat(post_reader.read_posts(dir)) site.posts.docs.concat(post_reader.read_drafts(dir)) if site.show_drafts end |