lib/middleman-blog-drafts/extension.rb in middleman-blog-drafts-0.0.1 vs lib/middleman-blog-drafts/extension.rb in middleman-blog-drafts-0.0.2

- old
+ new

@@ -46,9 +46,16 @@ # Get a {Resource} with mixed in {BlogArticle} methods representing the current article. # @return [Middleman::Sitemap::Resource] def current_article super || blog.draft(current_resource.path) end + + + # Returns the list of drafts on the site. + # @return [Array<Middleman::Sitemap::Resource>] + def drafts + blog.drafts.articles + end end end end end