gatsby-remark-youtube

Npm version Npm downloads MIT license PRs welcome

gatsby-remark-youtube is a Gatsby remark plugin to embed youtube videos with links.

Usage

  1. Download gatsby-remark-youtube from the NPM registry:
yarn add gatsby-remark-youtube
  1. Add the plugin in your gatsby-config.js file
require("dotenv").config()

module.exports = {
    plugins: [
        {
            resolve: "gatsby-transformer-remark",
            options: {
                plugins: [
                    "gatsby-remark-youtube",
                    "gatsby-remark-responsive-iframe",
                ],
            },
        },
    ],
}
  1. Add youtube video links to your content
[YOUTUBE EMBED: my video](https://www.youtube-nocookie.com/embed/VIDEO_ID)
[embed: my video](https://www.youtube.com/embed/VIDEO_ID)

Text need to contains “embed” to be transformed

Contributing

  • ⇄ Pull/Merge requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.