Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/dharfr/hexo-tag-dailymotion

A tag plugin to embed Dailymotion video player in your Hexo blog
https://github.com/dharfr/hexo-tag-dailymotion

Last synced: about 3 hours ago
JSON representation

A tag plugin to embed Dailymotion video player in your Hexo blog

Awesome Lists containing this project

README

        

# hexo-tag-dailymotion
A tag plugin to embed Dailymotion video player in your Hexo blog

[![npm](https://img.shields.io/npm/v/hexo-tag-dailymotion.svg)](https://www.npmjs.com/package/hexo-tag-dailymotion) [![npm](https://img.shields.io/npm/l/hexo-tag-dailymotion.svg)](https://github.com/dharFr/hexo-tag-dailymotion/blob/main/LICENSE)

## Installation

```
npm install hexo-tag-dailymotion
```

## Usage

```
{% dailymotion [player:player_id] [video:video_id] [playlist:playlist_id] %}
```

### Parameters

- `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).
- `video:video_id`: (optional) Identifier of the video to be loaded within the player
- `playlist:playlist_id`: (optional) Identifier of the playlist to be loaded within the player

All parameters are optional, but you must add either a `video` or `playlist` or the player will remains an empty black rectangle.

See [Video player documentation – Dailymotion for Developers](https://developers.dailymotion.com/player/) for details about how Dailymotion player works.

### Example usages

#### Embed a video

```
{% dailymotion player:xakn video:x84sh87 %}

```
will inject the following into hexo rendered page or post
``` html

```

#### Embed a playlist

```
{% dailymotion player:xakn playlist:x79dlo %}

```
will inject the following into hexo rendered page or post
``` html

```

#### Embed a video and a playlist

```
{% dailymotion player:xakn video:x84sh87 playlist:x79dlo %}

```
will inject the following into hexo rendered page or post
``` html

```

#### Embed a default player

```
{% dailymotion video:x84sh87 %}

```
will inject the following into hexo rendered page or post
``` html

```

#### Embed a player with parameters

```
{% dailymotion player:xakn video:x84sh87 params:startTime=15 %}

```
will inject the following into hexo rendered page or post
``` html

```
---
```
{% dailymotion player:xakn video:x84sh87 params:startTime=15&mute=true&loop=true %}

```
will inject the following into hexo rendered page or post
``` html

```