Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

juanpicado/metalsmith-youtube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metalsmith-youtube

A Metalsmith plugin that lets you embed YouTube videos.

Build Status

Installation

$ npm install metalsmith-youtube

Usage

Step 1

var youtube = require('metalsmith-youtube');

metalsmith.use(youtube({
  width: 560,      // optional, width video (default 560)
  height: 315,     // optional, height video (default 560)
  suggested: true,       // optional, display suggested videos
  controls: true,     // optional, display controls
  showTitle: true // optional, show video title and player actions
  privacy : true  // optional, enable privacy-enhaced mode
}));

Note that metalsmith-youtube should run before your Markdown parser. (While you can run it after parsing Markdown, doing so is a bad idea.)

Step 2

---
title: test
---

## only the id
youtube|hWhMKalEic8

CLI Usage

In your metalsmith.json:

{
  "plugins": {
    "metalsmith-youtube": {
      "width:": "560",
      "height": "315",
      "suggested": "true",
      "controls": "true",
      "showTitle": "true",
      "privacy" : "true"
    }
  }
}

License

MIT

About

metalsmith youtube plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published