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

Add options for YouTube iframe title, including downloading #224

Closed gfscott closed 9 months ago

gfscott commented 9 months ago

Close #205

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",    // All YouTube iframes get this title by default
  titleOptions: {
    download: true,                       // Download the titles from YouTube
    cacheDuration: '1h'                   // Cache titles for one hour
  }
});

Notes on implementation

changeset-bot[bot] commented 9 months ago

🦋 Changeset detected

Latest commit: ac4c936fe523b01927d4ce293be1cdb40e516f27

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 | Minor | | eleventy-plugin-embed-everything | Minor |

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

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (cbab6b4) 100.00% compared to head (ac4c936) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #224 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 7 7 Lines 158 172 +14 ========================================= + Hits 158 172 +14 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.