0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Provides an oembed liquid tag for Jekyll
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

jekyll-oembed

oEmbed plugin for jekyll that creates an oembed liquid tag

Installation

With bundler

Within your project's Gemfile, add the following within the :jekyll_plugins group:

# Gemfile
group :jekyll_plugins do
  gem 'jekyll_oembed'
end

Standalone

Add the code directly to your _plugins directory Create the following plugin in your projects _plugins directory.

If you do this, you will also need to add ruby-oembed to your Gemfile

# Gemfile
gem "ruby-oembed"

Usage

To use an oembed, simply do the following. Pass the embedded url as plain text, not wrapped in quotes like a string.

  # Correct
  {% oembed https://www.youtube.com/watch?v=GPUaUgjbbsA %}

  # Incorrect
  {% oembed "https://www.youtube.com/watch?v=GPUaUgjbbsA" %}

jekyll_oembed does not support customizing width, height, or adding any attributes directly to the embedded HTML.

Limitations

Protected URLs: some URLs are private. If this is the case, oembed may not function properly

Attribution

Thank you to:

This will automatically require all of the gems specified in your Gemfile.

Resources

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request