Module: Middleman::Blog::Drafts::Helpers
- Defined in:
- lib/middleman-blog-drafts/helpers.rb
Overview
Drafts-related helpers that are available to the Middleman application in config.rb
and in templates.
Instance Method Summary collapse
-
#current_article ⇒ Middleman::Sitemap::Resource
Get a Resource with mixed in BlogArticle methods representing the current article.
-
#drafts ⇒ Array<Middleman::Sitemap::Resource>
Returns the list of drafts on the site.
Instance Method Details
#current_article ⇒ Middleman::Sitemap::Resource
Get a Resource with mixed in BlogArticle methods representing the current article.
9 10 11 |
# File 'lib/middleman-blog-drafts/helpers.rb', line 9 def current_article blog.draft(current_resource.path) end |
#drafts ⇒ Array<Middleman::Sitemap::Resource>
Returns the list of drafts on the site.
15 16 17 |
# File 'lib/middleman-blog-drafts/helpers.rb', line 15 def drafts blog.drafts.articles end |