npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eleventy-plugin-embed-everything

v1.19.0

Published

An Eleventy plugin that allows you to quickly add common web embeds to markdown posts, using only their URLs

Downloads

5,098

Readme

eleventy-plugin-embed-everything

NPM Version Build test status codecov
MIT License Contributor Covenant

This Eleventy plugin will automatically embed common media formats in your pages, requiring only a URL in your markdown files.

It currently supports Instagram, SoundCloud, Spotify, TikTok, Twitch, Twitter, Vimeo, and YouTube, with more planned.

⚡️ Installation

In your Eleventy project, install the plugin through npm:

$ npm i eleventy-plugin-embed-everything

Then add it to your Eleventy config file:

const embedEverything = require("eleventy-plugin-embed-everything");

module.exports = function(eleventyConfig) {
  eleventyConfig.addPlugin(embedEverything);
};

🛠 Usage

To embed a YouTube video into any Markdown page, paste its URL into a new line. The URL should be the only thing on that line.

Markdown file example:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vehicula, elit vel condimentum porta, purus.

https://www.youtube.com/watch?v=dQw4w9WgXcQ

Maecenas non velit nibh. Aenean eu justo et odio commodo ornare. In scelerisque sapien at.

The same principle applies to the other supported services.

Result:

Rick Astley performing “Never gonna give you up”

🌈 Supported services

Currently, the plugin supports the following embed services (listed alphabetically):

On by default:

  • Instagram
  • OpenStreetMap
  • Spotify
  • TikTok
  • Twitch
  • Twitter
  • Vimeo
  • YouTube

Off by default (How to activate)

  • SoundCloud

More are planned!

⚙️ Settings

The plugin supports a number of frequently used services by default, and they have default settings of their own.

Configure which embed services are active

You can configure which services you want active by passing an options object to the addPlugin function:

Example: configure the plugin to embed all default services plus SoundCloud

eleventyConfig.addPlugin(embedEverything, {
  add: ['soundcloud']
});

Example: configure the plugin to embed only Vimeo and Instagram:

eleventyConfig.addPlugin(embedEverything, {
  use: ['vimeo', 'instagram']
});

Configure embed services individually

Each service comes with some useful defaults, but you can also configure each one individually. Override each plugin’s defaults by passing an options object that includes its fully-lowercase name as the key:

// configure YouTube videos to prohibit fullscreen
eleventyConfig.addPlugin(embedEverything, {
  youtube: {
    options: {
      allowFullscreen: false
    }
  }
});

Substitute vimeo, instagram, and so on in place of youtube. Consult the individual plugin packages for their relevant defaults and options.

⚠️ Notes and caveats

  • This plugin does very little on its own. Instead, it aggregates other embed plugins in a single place.
  • Each service is itself a standalone Eleventy plugin, each of which you can install individually.
  • If there’s a specific service you’d want added, please open an issue.
  • This plugin is not tested against Node.js < 14 (since ava doesn’t support it). I believe the plugin still works on older, officially unsupported Node.js versions but this can’t be guaranteed.

Aggregated plugins

For more about each supported service, consult this table of relevant links.

| Service | Package | Repository | Options | | ------- | ------- | ---------- | ------- | | Instagram | npm | GitHub | Options | | OpenStreetMap | npm | GitHub | Options | | SoundCloud | npm | GitHub | Options | | Spotify | npm | GitHub | Options | | TikTok | npm | GitHub | Options | | Twitch | npm | GitHub | Options | | Twitter | npm | GitHub | Options | | Vimeo | npm | GitHub | Options | | YouTube | npm | GitHub | Options |