Giter VIP home page Giter VIP logo

jekyll-embeds's Introduction

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)

jekyll-embeds's People

Contributors

zebas204 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.