Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/quacksouls/honkit-plugin-youtube

Link to a YouTube video in HonKit
https://github.com/quacksouls/honkit-plugin-youtube

gitbook gitbook-plugin honkit honkit-plugin javascript

Last synced: 1 day ago
JSON representation

Link to a YouTube video in HonKit

Awesome Lists containing this project

README

        

# HonKit plugin: youtube

Link to a YouTube video in HonKit.

## Installation

Install via npm:

```sh
npm install honkit-plugin-youtube --save-dev
```

Add the plugin to your `book.json`:

```js
{
plugins: [ "youtube" ]
}
```

## Usage

Link to a YouTube video as follows:

```
{% youtube id="video_id", title="video_title" %}{% endyoutube %}
```

* `id` -- The ID of the YouTube video. For example, if the URL of the video is

https://www.youtube.com/watch?v=p3G5IXn0K7A

then the ID of the video is `p3G5IXn0K7A`.
* `title` -- The title of the video.

Here is an example:

```
{% youtube id="p3G5IXn0K7A", title="The Hamsterdance Song" %}{% endyoutube %}
```

The video title might have double quotation marks. You should backslash escape each
double quotation mark as follows:

```
{% youtube id="p3G5IXn0K7A", title="The \"Hamsterdance\" Song" %}{% endyoutube %}
```