Link to a YouTube video in HonKit.
Install via npm:
npm install honkit-plugin-youtube --save-dev
Add the plugin to your book.json
:
{
plugins: [ "youtube" ]
}
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 isp3G5IXn0K7A
.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 %}