middleman-blog-drafts
middleman-blog-drafts is an addon for middleman-blog that simplifies draft posts creation and publishing.
Install
If you're just getting started, install the required gems and generate a new blog project:
gem install middleman middleman-blog-drafts
middleman init MY_BLOG_PROJECT --template=blog
Then add middleman-blog-drafts
to your Gemfile
and activate the extension in your config.rb
:
activate :drafts
Generating drafts
middleman draft 'My awesome new blog post'
Publishing drafts
middleman publish source/drafts/my-awesome-new-blog-post.markdown
Listing drafts on a page
<% if settings[:environment] == :development %>
<ul>
<% drafts.each do |draft| %>
<li><%= link_to draft.title, draft.path %></li>
<% end %>
</ul>
<% end %>
Learn More
See the blog extension guide for detailed information on configuring and using the blog extension.
Credits
Most of the code was based on the middleman-blog gem itself, so many thanks to everyone that helped out with it.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request