GitHub logo raae / gatsby-remark-oembed

A GatsbyJS Plugin that transforms oembed links into its corresponding embed code.

Gatsby Remark oEmbed Plugin

This GatsbyJS Remark Sub-Plugin transforms oEmbed links (Twitter, Instagram, YouTube, Vimeo, SoundCloud, CodePen etc.) into its corresponding embed code.

This is an early version of the plugin. Let me know if you have problems or questions by submitting an issue.

Install

npm install @raae/gatsby-remark-oembed

or

yarn add @raae/gatsby-remark-oembed

Requirements

  • Node version 8 and up.
  • Gatsby version >=2.0.88
  • Gatsby Transformer Remark Plugin >=2.0.0

oEmbed support

Under the hood the oEmbed provider list from oembed.com is used.

So far these providers are confirmed to be working: CodePen, Flickr, Instagram, Reddit, Twitch, Twitter, Vimeo, YouTube, SoundCloud.

Twitter, Flickr, Instagram and Reddit requires external javascript to be added to every page. So make sure to exclude the ones you do not need.

Example site

Check out gatsby-remark-oembed.netlify.com/. Its source code can be found in gatsby-remark-oembed-example-site.

How to use

Configuration

// In your gatsby-config.js
plugins: [
  {
    resolve: 

View on GitHub