This plugins requires gitbook >=2.0.0
.
Add the below to your book.json
file, then run gitbook install
:
{
"plugins": ["bilibili"]
}
You can now add bilibili videos to your book using this tag:
{% bilibili %} 2440534 {% endbilibili %}
or
{% bilibili %} av2440534 {% endbilibili %}
This will embed the video from http://www.bilibili.com/video/av2440534/.
Full parameters' format
{av} [#{page}] [@{width}x{height}]
av
AV is bilibili video's number.
page
Indicates which sub video in the specified av number should be played.
Default is 1. And page
counts from 1.
Supported from version 0.6.0
width x height
Specify the size of the player.
Default is 100% x 100%
Supported from version 0.4.x
Here are some examples.
{% bilibili %} 2440534 {% endbilibili %}
{% bilibili %} av2440534 {% endbilibili %}
{% bilibili %} av2440534@640x480 {% endbilibili %}
{% bilibili %} av2440534#2@640x480 {% endbilibili %}