All Projects → getgrav → grav-plugin-youtube

getgrav / grav-plugin-youtube

Licence: MIT license
Grav YouTube Plugin

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
Twig
543 projects

Projects that are alternatives of or similar to grav-plugin-youtube

grav-plugin-snipcart
Grav Snipcart Plugin
Stars: ✭ 17 (-19.05%)
Mutual labels:  grav, grav-plugin
grav-plugin-external-links
This plugin adds small icons to external and mailto links, informing users the link will take them to a new site or open their email client.
Stars: ✭ 15 (-28.57%)
Mutual labels:  grav, grav-plugin
grav-plugin-simplesearch
Grav SimpleSearch Plugin
Stars: ✭ 40 (+90.48%)
Mutual labels:  grav, grav-plugin
grav-plugin-toc
This plugin automagically generates a (minified) Table of Contents based on special markers in the document and adds it into the resulting HTML document.
Stars: ✭ 12 (-42.86%)
Mutual labels:  grav, grav-plugin
grav-plugin-comments
Grav Comments Plugin
Stars: ✭ 52 (+147.62%)
Mutual labels:  grav, grav-plugin
grav-plugin-jscomments
JSComments is a Grav (http://github.com/getgrav/grav) plugin which allows to integrate comments into individual pages from Discourse / Disqus / Facebook / Google+ / HyperComments / IntenseDebate / Isso, and Muut comment systems.
Stars: ✭ 28 (+33.33%)
Mutual labels:  grav, grav-plugin
grav-plugin-maintenance
Grav Maintenance Plugin
Stars: ✭ 12 (-42.86%)
Mutual labels:  grav, grav-plugin
grav-plugin-form
Grav Form Plugin
Stars: ✭ 48 (+128.57%)
Mutual labels:  grav, grav-plugin
grav-plugin-advanced-pagecache
Grav AdvancedPageCache Plugin
Stars: ✭ 19 (-9.52%)
Mutual labels:  grav, grav-plugin
grav-plugin-api
A REST API plugin for GravCMS
Stars: ✭ 24 (+14.29%)
Mutual labels:  grav, grav-plugin
grav-plugin-facebook
Facebook plugin for Grav CMS https://github.com/getgrav/grav
Stars: ✭ 16 (-23.81%)
Mutual labels:  grav, grav-plugin
grav-plugin-devtools
Grav Devtools Plugin
Stars: ✭ 36 (+71.43%)
Mutual labels:  grav, grav-plugin
grav-plugin-themer
This plugin enables you use different themes on one site individual set per page or collection.
Stars: ✭ 16 (-23.81%)
Mutual labels:  grav, grav-plugin
grav-plugin-featherlight
Grav Featherlight Plugin
Stars: ✭ 29 (+38.1%)
Mutual labels:  grav, grav-plugin
grav-plugin-markdown-notices
Grav Markdown Notices Plugin
Stars: ✭ 31 (+47.62%)
Mutual labels:  grav, grav-plugin
grav-plugin-data-manager
Grav Data Manager Plugin
Stars: ✭ 28 (+33.33%)
Mutual labels:  grav, grav-plugin
grav-plugin-proposal
Sales Proposal Plugin for Grav
Stars: ✭ 16 (-23.81%)
Mutual labels:  grav, grav-plugin
grav-plugin-blackhole
The static site generator for Grav CMS
Stars: ✭ 152 (+623.81%)
Mutual labels:  grav, grav-plugin
grav-plugin-langswitcher
Grav LangSwitcher Plugin
Stars: ✭ 22 (+4.76%)
Mutual labels:  grav, grav-plugin
grav-plugin-instagram
Instagram is a simple plugin that includes Instagram feed to your Grav website.
Stars: ✭ 13 (-38.1%)
Mutual labels:  grav, grav-plugin

Grav YouTube Plugin

YouTube is a simple Grav Plugin that converts markdown links into responsive embeds.

Installation

Installing the YouTube plugin can be done in one of two ways. Our GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file.

GPM Installation (Preferred)

The simplest way to install this plugin is via the Grav Package Manager (GPM) through your system's Terminal (also called the command line). From the root of your Grav install type:

bin/gpm install youtube

This will install the YouTube plugin into your /user/plugins directory within Grav. Its files can be found under /your/site/grav/user/plugins/youtube.

Manual Installation

To install this plugin, just download the zip version of this repository and unzip it under /your/site/grav/user/plugins. Then, rename the folder to youtube. You can find these files either on GitHub or via GetGrav.org.

You should now have all the plugin files under

/your/site/grav/user/plugins/youtube

Config Defaults

enabled: true
built_in_css: true
player_parameters:
  autoplay: 0
  cc_load_policy: 0
  color: red
  controls: 1
  disablekb: 0
  enablejsapi: 0
  fs: 1
  hl: ''
  iv_load_policy: 1
  loop: 0
  modestbranding: 0
  origin: ''
  playsinline: 0
  rel: 1
  vq: default
privacy_enhanced_mode: false

If you need to change any value, then the best process is to copy the youtube.yaml file into your users/config/plugins/ folder (create it if it doesn't exist), and then modify there. This will override the default settings.

You can also set any of these settings on a per-page basis by adding them under a youtube: setting in your page header. For example:

---
title: YouTube Video
youtube:
    player_parameters:
        autoplay: 1
---

[plugin:youtube](https://www.youtube.com/watch?v=BK8guP9ov2U)

This will display a video and auto-play it.

For more details on the player_parameters, please check out the YouTube official documentation

Usage

To use this plugin you simply need to include a youtube URL in markdown link such as:

[plugin:youtube](https://www.youtube.com/watch?v=BK8guP9ov2U)

Will be converted into the following embeded HTML:

<div class="grav-youtube"><iframe src="https://www.youtube.com/embed/BK8guP9ov2U" frameborder="0" allowfullscreen=""></iframe></div>

CSS is also loaded to provide the appropriate responsive layout.

Shortcode Syntax

As of version 3.0 you can now use an alternative shortcode syntax that supports passing in the player parameter values inline.

NOTE: shortcode-core plugin is required and must be installed and enabled for Shortcode Syntax to work.

[youtube color=white autoplay=1]https://www.youtube.com/watch?v=BK8guP9ov2U[/youtube]

Using the shortcode syntax it is also possible to set a custom thumbnail picture when using lazy_load.

[youtube lazy_load=true thumbnail="name of media.jpg"]https://www.youtube.com/watch?v=BK8guP9ov2U[/youtube]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].