Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dbelyaeff/cogear-plugin-youtube
Transform formatted youtube-links to youtube-embed player.
https://github.com/dbelyaeff/cogear-plugin-youtube
Last synced: about 2 months ago
JSON representation
Transform formatted youtube-links to youtube-embed player.
- Host: GitHub
- URL: https://github.com/dbelyaeff/cogear-plugin-youtube
- Owner: dbelyaeff
- Created: 2018-08-17T17:40:28.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-05T10:10:30.000Z (almost 6 years ago)
- Last Synced: 2024-04-05T03:06:19.739Z (5 months ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 📺`YouTube` plugin for Cogear.JS
Transforms links like `!https://www.youtube.com/watch?v=xxxxxxxxxx` to embed video players (iframe).
> Pay attention that `!` prefix before link scheme is required.
# Requirements
Works with **Cogear.JS** v1.0.13 or higher.
# Installation
Go to the site folder and install plugin with command:
```bash
yarn add cogear-plugin-youtube
# or
npm install cogear-plugin-youtube
```Plugin will loads up automatically.
# Usage
To avoid YouTube embed loads on startup plugin render only thumb with icon.
On click it's been replaced with embed.
Plugin script and styles automatically injected in all entries.
To override it set in `./config.yaml`:
``` yaml
youtube:
inject: false
```And then you can process it manually as you want.
See `./youtube.js` entry point to understand how.
# Docs
More info: [https://cogearjs.org/docs/plugins](https://cogearjs.org/docs/plugins).