This is a handy embed.ly client for people that use the static-site generator jekyll.
embedly.rb
file and place it in the _plugins/
inside your
Jekyll project directory._config.yml
as described below.embedly
-Liquid tag somewhere on your site.{% embedly http://soundcloud.com/mightyoaksmusic/rainier %}
Please not that github-pages does not allow the use of plugins, if you want to make use of this plugin, you have to compile your site yourself.
_config.yml
First, pass in your newly acquired API key like so:
embedly:
api_key: abcdefg123456780cafebabe101cat44
You can further customize your embeds adding host-specific parameters.
embedly:
api_key: abcdefg123456780cafebabe101cat44
soundcloud:
color: 0066FF # SoundCloud specific parameter for colorful players
width: 500px
vimeo:
width: 500px
You can also pass along parameters to individual embeds, e.g.
{% embedly http://soundcloud.com/mightyoaksmusic/rainier, color: 00FFFF %}
# Linebreaks are currently not supported :-/
For a list of supported parameters, please have a look at embed.ly’s documentation as well as the documentation for the oEmbed implementation of the specific hosts.
Provider specific parameters are currently not working properly across the board. Please let me know what works and what doesn't.
Your embed will be wrapped inside a div
-tag that has classes matching the
embeds type, provider as well as the generic embed
.
E.g.
{% embedly http://soundcloud.com/mightyoaksmusic/rainier %}
will result in
<div class="embed rich soundcloud">
...
</div>