0.1.9 • Published 2 years ago

eleventy-plugin-lite-youtube v0.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Eleventy plugin for easy embedding of YouTube videos with a minimal size

The plugin leverages Paul Irish´s lite-youtube web component.

The typical YouTube embed has a weight above 1 MB, while Paul Irish´s <lite-youtube> comes with a total weight of 32 KB (which is about 2-3 % of the original size). This way pages load much faster and consume much less bandwidth. And, as a bonus, it´s easier to embed a YouTube video – dropping the URL in a dedicated textline is enough.

Please also refer to ONE YOUTUBE EMBED WEIGHS ALMOST 1.2 MB.

Install

npm install --save-dev eleventy-plugin-lite-youtube

In your eleventy.js file:

const liteYoutube = require("eleventy-plugin-lite-youtube");
//...
eleventyConfig.addPlugin(liteYoutube);

Usage

The plugin will replace the following occurrences in your content with the <lite-youtube> web component:

  • A YouTube url within a single line of your markdown
  • A YouTube url enclosed by <p></p>
  • A YouTube url enclosed by <figure></figure> (<figcaption> is fine)
  • A YouTube embedding <iframe>
0.1.8

2 years ago

0.1.9

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago