An Eleventy plugin to automatically embed Vimeo videos, using just their URLs.
npm install eleventy-plugin-vimeo-embed

\


This Eleventy plugin automatically embeds responsive Vimeo videos from URLs in Markdown files.
- ⚡️ Installation
- 🛠 Usage
- ⚙️ Settings
- ⚠️ Notes and caveats
---
In your Eleventy project, install the plugin through npm:
``sh`
$ npm i eleventy-plugin-vimeo-embed
Then add it to your Eleventy config file:
`javascript
const embedVimeo = require("eleventy-plugin-vimeo-embed");
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(embedVimeo);
};
`
To embed a Vimeo video into any Markdown page, paste its URL into a new line. The URL should be the only thing on that line.
`markdown
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vehicula, elit vel condimentum porta, purus.
https://vimeo.com/347565673
Maecenas non velit nibh. Aenean eu justo et odio commodo ornare. In scelerisque sapien at.
`
!Screenshot of a Vimeo embed of Christian Stangl’s “The Comet”
You can configure the plugin to change its behavior by passing an options object to the addPlugin function:
`javascript`
eleventyConfig.addPlugin(embedVimeo, {
// edit options here
});
Edit any of the default values in this options object to override the plugin behavior. These are the default settings, which will apply to all embed instances. Currently there’s no way to configure individual embeds.
`javascript
{
// Default “allowfullscreen” boolean attribute that gets applied to the embed