gitbook-plugin-video-embed
v0.0.1
Published
GitBook plugin to embed videos using Liquid template syntax
Maintainers
Readme
GitBook Video Embed Plugin
A GitBook plugin that allows you to embed videos using Liquid template syntax. Currently supports YouTube videos.
Installation
Add the plugin to your book.json:
{
"plugins": ["video-embed"]
}Then install the plugin:
gitbook installUsage
You can embed videos using the following syntax in your markdown files:
{% embed url="https://www.youtube.com/watch?v=VIDEO_ID" %}or simply:
{% embed https://www.youtube.com/watch?v=VIDEO_ID %}The plugin will automatically:
- Extract the video ID from the URL
- Create a responsive iframe embed
- Support both youtube.com and youtu.be URLs
Example
{% embed url="https://www.youtube.com/watch?v=dQw4w9WgXcQ" %}This will create a responsive video embed that:
- Automatically adjusts to the container width
- Maintains a 16:9 aspect ratio
- Supports fullscreen mode
- Includes all necessary YouTube player features
Features
- Simple and intuitive syntax
- Responsive design
- Automatic URL parsing
- Support for both long and short YouTube URLs
- Debug logging capability
License
MIT © CPBOX
