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: [email protected]
senders:  [email protected]

preprocessors:
  - key: 'automatic-clowncar'
    options:
      namespace_directory: photos

mailman:
  server: imap.gmail.com
  port: 993
  ssl: true
  username: [email protected]
  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

  1. Fork it ( https://github.com/[my-github-username]/m2fm-automatic-clowncar/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request