Skip to content

ntwcklng/gatsby-remark-embed-youtube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-remark-embed-youtube

Embed a Youtube Video in your Markdown

Install

  1. Install plugin to your site:
yarn add gatsby-remark-embed-youtube
  1. Add following to your gatsby-config.js:
    plugins: [      
      {
        resolve: "gatsby-transformer-remark",
        options: {
          plugins: [
          {
            resolve: "gatsby-remark-embed-youtube",
            options: {
              width: 800,
              height: 400
            }
          }
          ]
        }
      },

Note: if you also rely on gatsby-remark-responsive-iframe, you have to define the embed-youtube plugin first:

plugins: [
  "gatsby-remark-embed-youtube",
  "gatsby-remark-responsive-iframe"
]
  1. Restart gastby.

Usage

# Look at this Video:

`youtube:https://www.youtube.com/embed/2Xc9gXyf2G4`

License

MIT