@raae/gatsby-source-youtube-oembed

0.4.0 • Public • Published

@raae/gatsby-source-youtube-oembed

Source YouTube information without an API key using the oEmbed endpoint 📺

 

A message or two from Queen Raae 👑

1-on-1 Emergency Gatsby Call

Are you stuck on a reef in the sharky waters around the Gatsby islands? Check out 1-on-1 Emergency Gatsby Call with Queen Raae to get friendly advice you can put into action immediately from a seasoned Gatsby developer.

Stay updated and get the most out of Gatsby

Learn how to get the most out of Gatsby and stay updated on the plugin by subscribing to daily emails from Queen Raae and Cap'n Ola.

 

How to install

npm install @raae/gatsby-source-youtube-oembed

or

yarn add @raae/gatsby-source-youtube-oembed

How to use

module.exports = {
  plugins: [
    `@raae/gatsby-source-youtube-oembed`
  ],
}

Plugin Options

YouTube Ids

Add the YouTube ids for the videos you would like to source!
Type: An array of YouTube ids
Example: ["Bk1jonYPFD4", "TzJfepDjpzM"]
Default: []

// gatsby.config.js

module.exports = {
  plugins: [
    {
      resolve: "@raae/gatsby-source-youtube-oembed",
      options: {
        youTubeIds: ["Bk1jonYPFD4", "TzJfepDjpzM"],
      },
    },
  ],
};

Refresh Interval

Time to wait between fetching fresh oEmbed data.
Type: Time in milliseconds
Example: 60000
Default(dev): 60000 * 5 (5 minutes) Default(prod): 0

// gatsby.config.js

module.exports = {
  plugins: [
    {
      resolve: "@raae/gatsby-source-youtube-oembed",
      options: {
        refreshInterval: 60000,
      },
    },
  ],
};

Questions, Feedback and Suggestions

If you have any questions, feedback or suggestions head on over to discussions.

Found a bug?

If you find a bug please open an issue and/or create a pull request to fix it.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.4.0
    0
    • latest

Version History

Package Sidebar

Install

npm i @raae/gatsby-source-youtube-oembed

Weekly Downloads

0

Version

0.4.0

License

MIT

Unpacked Size

11.4 kB

Total Files

5

Last publish

Collaborators

  • raae