module Middleman::Blog::Drafts::Helpers

Drafts-related helpers that are available to the Middleman application in config.rb and in templates.

Public Instance Methods

current_article() click to toggle source

Get a {Resource} with mixed in {BlogArticle} methods representing the current article. @return [Middleman::Sitemap::Resource]

# File lib/middleman-blog-drafts/helpers.rb, line 9
def current_article
  blog.draft(current_resource.path)
end
drafts() click to toggle source

Returns the list of drafts on the site. @return [Array<Middleman::Sitemap::Resource>]

# File lib/middleman-blog-drafts/helpers.rb, line 15
def drafts
  blog.drafts.articles
end