Skip to content

Gitbook plugin for getting any video or iframe card supported by iframely.

Notifications You must be signed in to change notification settings

1cgonza/gitbook-plugin-iframely

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gitbook plugin iframely

Get any video or iframe card supported by iframely. (Vimeo, YouTube, Facebook, Twitter, Instagram, etc)

If you prefer an option without the need for an API key or depending on creating an account, you can try gitbook-plugin-noembed. It has less supported sites than iframely but still has all the popular ones and more.

Installation

Add "iframely" to your plugins in book.json.

{
  "plugins": ["iframely"]
}

API Key (Required)

You need an API key from iframely (FREE or paid). The free one can get you started and should work for most cases.

Once you have the key, add it to your environment variable or book.json when executing gitbook-cli. If both environment variable and book.json are assigned, it will be prior to use values from environment variable.

> IFRAMELY_APIKEY=YOUR_IFRAMELY_APIKEY gitbook build
# or
> IFRAMELY_APIKEY=YOUR_IFRAMELY_APIKEY gitbook serve
{
  "pluginsConfig": {
    "iframely": {
      "apiKey": "YOUR_API_KEY"
    }
  }
}

Usage

  • You can use two filters: iframely or video. (At the moment they both do exactly the same)
  • Make sure you wrap your URL around single or double quotes.
{{ 'https://vimeo.com/31942602' | iframely }}

or

{{ 'https://vimeo.com/31942602' | video }}

About

Gitbook plugin for getting any video or iframe card supported by iframely.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages