Skip to content

playfulprogramming/gatsby-remark-twitch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-remark-twitch

Embed Twitch videos/clips/channels in Gatsby markdown

Install

npm install --save @weknow/gatsby-remark-twitch

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: "gatsby-transformer-remark",
    options: {
      plugins: [
        {
          resolve:"@weknow/gatsby-remark-twitch",
          options: {
            width: 800,
            height: 400,
            // Required!
            domain: 'example.com' // Also accepts "https://example.com/route
          }
        }
      ]
    }
  }
];

Usage

# Blog post title

This is an example of embedding twitch media.
Add any markdown as you normally do, and then insert a valid
twitch link anywhere to automatically transform it into an embed

#### Twitch video

https://www.twitch.tv/videos/347319713

#### Twitch clip

https://clips.twitch.tv/MagnificentOilyUdonTTours

#### Twitch channel

https://www.twitch.tv/xisuma

NOTE: Make sure to copy the link instead of embed code.

How this looks like

View a live demo here

License

MIT

About

Embed Twitch videos/clips/channels in Gatsby markdown

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%