gfscott / eleventy-plugin-embed-everything

An Eleventy plugin to easily embed common media formats in posts, using only their URLs
https://gfscott.com/embed-everything/
MIT License
99 stars 6 forks source link

Restore YouTube options for custom iframe title and title download option #233

Closed gfscott closed 8 months ago

gfscott commented 8 months ago

Closes #205. Genuinely fixes #230 instead of just mitigating it. Supersedes #224.

This PR adds several options related to YouTube embed titles:

How to use it

This simplified example shows the new title options in action:

eleventyConfig.addPlugin(embedYouTube, {
  title: "Custom iframe title wooooo",    // Default/fallback iframe title value
  titleOptions: {
    download: true,                       // Download the titles from YouTube
    cacheDuration: '1h'                   // Cache titles for one hour
  }
});

Notes on implementation

changeset-bot[bot] commented 8 months ago

🦋 Changeset detected

Latest commit: cb5cc3aeaf03f29392a34714b5365798d8c31174

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | -------------------------------- | ----- | | eleventy-plugin-youtube-embed | Patch | | eleventy-plugin-embed-everything | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR