No commit activity in last 3 years
No release in over 3 years
mail2frontmatter plugin to transform links into embed code automatically
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
>= 0
~> 10.0
>= 0

Runtime

 Project Readme

Mail2FrontMatter::AutomaticEmbeds

AutomaticEmbeds is a Mail2FrontMatter plugin which generates embed codes for links. This is a thin layer around the auto_html project to generate the necessary HTML.

Installation

Add this line to your application's Gemfile:

gem 'm2fm-automatic-embeds', require: false

And then execute:

$ bundle

Configuration

In your Mail2FrontMatter YAML configuration enable the plugin by adding it to your preprocessors:

preprocessors:
  - key: 'automatic-embeds'

You can provide a whitelist or blacklist for filters as well as providing filters options. Filter options are documented at the auto_html project.

preprocessors:
  - key: 'automatic-embeds'
    options:
      white_list:
        - youtube
        - soundcloud
        - vimeo
      filters:
        youtube:
          autoplay: true
          other_attribute: other_value

Usage

That's it! Now incoming links from a number of content providers will be embedded automatically.

Contributing

  1. Fork it ( https://github.com/whistlerbrk/m2fm-automatic-embed/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