Module: Middleman::Blog::Drafts::Helpers
- Defined in:
- lib/middleman-blog-drafts/extension.rb
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.
48 49 50 |
# File 'lib/middleman-blog-drafts/extension.rb', line 48 def current_article super || blog.draft(current_resource.path) end |
#drafts ⇒ Array<Middleman::Sitemap::Resource>
Returns the list of drafts on the site.
55 56 57 |
# File 'lib/middleman-blog-drafts/extension.rb', line 55 def drafts blog.drafts.articles end |