Mail2FrontMatter::AutomaticClowncar
Mail2FrontMatter plugin for Middleman specific blogs using Automatic Clowncar to generate responsive images for your blog.
Mail2FrontMatter::AutomaticClowncar
replaces markup from inline attachments in an email with Automatic Clowncar compatible markup as well as placing your attachments in the namespaced directory (e.g. photos).
Installation
Add this line to your application's Gemfile:
gem 'm2fm-automatic-clowncar', require: false
And then execute:
$ bundle
Configuration
In your Mail2FrontMatter YAML configuration enable the plugin by adding it to your preprocessors:
protocol: imap
receiver: yourblogemail@yourdomain.com
senders: yourpersonal@yourdomain.com
preprocessors:
- key: 'automatic-clowncar'
options:
namespace_directory: photos
mailman:
server: imap.gmail.com
port: 993
ssl: true
username: yourblogemail@yourdomain.com
password: yourpassword
Usage
That's it! Now incoming images will be moved to your namespaced directory or by default photos (source/photos). Additionally the markup will be changed to reflect that, and the next time you run middleman build, or in development, automatic clowncar should take care of the rest.
Contributing
- Fork it ( https://github.com/whistlerbrk/m2fm-automatic-clowncar/fork )
- 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 a new Pull Request