/Jekyll-Embeds

This Jekyll plugging allows embed media elements into your site.

Primary LanguageRubyMIT LicenseMIT

This Jekyll pluging allows a tag that takes a URL and generates a html snippet to embed the element into your site


   IMPORTANT: This plugin doesn't work in github-pages for now (needs to be in whitelist)

Installation

Add this line to your Gemfile:

group :jekyll_plugins do
  gem "jekyll-embeds"
end

And then execute:

$ bundle

Alternatively install the gem yourself as:

$ gem install jekyll-embeds

and put this in your _config.yml (for Jekyll < 3.5.0)

plugins: [jekyll-embeds]

Usage

# All [bool] = [true/false] => false (default)
# In case you want to define it, you need defile the before params.

# Youtube (no playlists)
{% youtube [url] % }

# Twitch
{% twitch [url/id] [type] [bool] %}
Type => channel(def), video, clip

# Vimeo
{% vimeo [url] %}

# SoundCloud
{% soundcloud [id] [color] [bool] %}
Color => HEX without the '#'

# Spotify
{% spotify [id/url] %}
id => spotify:track:7HOgPR1oVFyq9SwJrniXbR
                    ^     ONLY THIS      ^
url => Support:
    * //open.spotify.com/album/
    * //open.spotify.com/embed/track/

I recommend puts in your css the following, this will make the look much better

.embed-container {position: relative;height: 0;overflow: hidden;max-width: 100%;}
.embed-container iframe, .embed-container object, .embed-container embed {position: absolute;top: 0;left: 0;width: 100%;height: 100%;}

(They are on a page to save space)