rakannimer/gatsby-mdx-embed

An mdx plugin to embed YouTube, Twitter etc into .mdx without imports ๐Ÿงผ

โ˜… 1Forks 0GitHub โ†—Compare

Project website โ†—

README

gatsby-mdx-embed image

gatsby-mdx-embed

With gatsby-mdx-embed you can embed media content from providers like Twitter, YouTube, Instagram and a number of others directly in .mdx ... no imports required

๐Ÿ‘๏ธ Preview

๐Ÿš€ Getting started

Install

npm install @pauliescanlon/gatsby-mdx-embed --save

Install peer dependencies

npm install @mdx-js/react gatsby-plugin-mdx --save

Setup

// gatsby.config
module.exports = {
  ...
  plugins: [`@pauliescanlon/gatsby-mdx-embed`]
  ...
}

gatsby-mdx-embed automatically injects an MdxProvider. If it's the first and / or only plugin that uses this method you shouldn't have any clashes.

However, if you're using a theme or some other plugin that uses .mdx you may need to switch the order of the plugins.

A note on using multiple MdxProvider(s) directly from @chrisbiscardi

Multiple providers will merge the components object. Last provider wins

If you're using gatsby-mdx-embed in your project i'd love to hear from you @pauliescanlon

ko-fi

Thanks to the following projects which were used as references

Contributors

PaulieScanlon

Issues