Skip to content

Commit 62f0220

Browse files
committed
More useful README
1 parent abe1507 commit 62f0220

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,73 @@
11
# hexo-tag-dailymotion
22
A tag plugin to embed Dailymotion video player in your Hexo blog
3+
4+
![npm](https://img.shields.io/npm/v/hexo-tag-dailymotion.svg) ![npm](https://img.shields.io/npm/l/hexo-tag-dailymotion.svg)
5+
6+
7+
## Installation
8+
9+
```
10+
npm install hexo-tag-dailymotion
11+
```
12+
13+
## Usage
14+
15+
```
16+
{% dailymotion [player:player_id] [video:video_id] [playlist:playlist_id] %}
17+
```
18+
19+
### Parameters
20+
21+
- `player:player_id`: (optional) Identifier of your custom player configuration (See [Getting Started section in Dailymotion Video player documentation](https://developers.dailymotion.com/player/#getting-started).
22+
- `video:video_id`: (optional) Identifier of the video to be loaded within the player
23+
- `playlist:playlist_id`: (optional) Identifier of the playlist to be loaded within the player
24+
25+
All parameters are optional, but you must add either a `video` or `playlist` or the player will remains an empty black rectangle.
26+
27+
See [Video player documentation – Dailymotion for Developers](https://developers.dailymotion.com/player/) for details about how Dailymotion player works.
28+
29+
### Example usages
30+
31+
#### Embed a video
32+
33+
```
34+
{% dailymotion player:xakn video:x84sh87 %}
35+
36+
```
37+
will inject the following into hexo rendered page or post
38+
``` html
39+
<script src="https://geo.dailymotion.com/player/xakn.js" data-video="x84sh87" ></script>
40+
```
41+
42+
#### Embed a playlist
43+
44+
```
45+
{% dailymotion player:xakn playlist:x79dlo %}
46+
47+
```
48+
will inject the following into hexo rendered page or post
49+
``` html
50+
<script src="https://geo.dailymotion.com/player/xakn.js" data-playlist="x79dlo"></script>
51+
```
52+
53+
#### Embed a video and aplaylist
54+
55+
```
56+
{% dailymotion player:xakn video:x84sh87 playlist:x79dlo %}
57+
58+
```
59+
will inject the following into hexo rendered page or post
60+
``` html
61+
<script src="https://geo.dailymotion.com/player/xakn.js" data-video="x84sh87" data-playlist="x79dlo"></script>
62+
```
63+
64+
#### Embed a default player
65+
66+
```
67+
{% dailymotion video:x84sh87 %}
68+
69+
```
70+
will inject the following into hexo rendered page or post
71+
``` html
72+
<script src="https://geo.dailymotion.com/player.js" data-video="x84sh87"></script>
73+
```

0 commit comments

Comments
 (0)