https://github.com/hexojs/hexo-tag-embed
https://github.com/hexojs/hexo-tag-embed
hexo hexo-plugin typescript
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hexojs/hexo-tag-embed
- Owner: hexojs
- License: mit
- Created: 2022-09-18T00:12:13.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-02T14:23:27.000Z (over 2 years ago)
- Last Synced: 2024-04-24T16:24:18.297Z (about 2 years ago)
- Topics: hexo, hexo-plugin, typescript
- Language: TypeScript
- Size: 36.1 KB
- Stars: 4
- Watchers: 11
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hexo-tag-embed
[](https://github.com/hexojs/hexo-tag-embed/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/hexo-tag-embed)
[](https://coveralls.io/github/hexojs/hexo-tag-embed)
> **Warning**
>
> Please do not use this plugin with less than hexo `v7.0.0`.
> **Note**
>
> This plugin's features have been divided from https://github.com/hexojs/hexo
>
> - https://github.com/hexojs/hexo/pull/5064
> - https://github.com/hexojs/hexo/pull/5067
> - https://github.com/hexojs/hexo/pull/5065
> - https://github.com/hexojs/hexo/pull/5066
# Installation
```sh
$ npm i hexo-tag-embed
```
# Usage
## Gist
To embed a Gist snippet:
```ejs
{% gist gist_id [filename] %}
```
## jsFiddle
To embed a jsFiddle snippet:
```ejs
{% jsfiddle shorttag [tabs] [skin] [width] [height] %}
```
## Vimeo
Inserts a responsive or specified size Vimeo video.
```ejs
{% vimeo video_id [width] [height] %}
```
## YouTube
Inserts a YouTube video.
```ejs
{% youtube video_id [type] [cookie] %}
```
### Examples
Embed a video
```ejs
{% youtube lJIrF4YjHfQ %}
```
Embed a playlist
```ejs
{% youtube PL9hW1uS6HUfscJ9DHkOSoOX45MjXduUxo 'playlist' %}
```
Enable privacy-enhanced mode
YouTube’s cookie is not used in this mode.
```ejs
{% youtube lJIrF4YjHfQ false %}
{% youtube PL9hW1uS6HUfscJ9DHkOSoOX45MjXduUxo 'playlist' false %}
```
## LICENSE
MIT