Socket
Socket
Sign inDemoInstall

gatsby-remark-github-snack

Package Overview
Dependencies
5
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gatsby-remark-github-snack

Compatible with Gatsby `v5.x.x`. It's not tested with previous versions


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Install size
61.7 kB
Created
Weekly downloads
 

Readme

Source

gatsby-remark-github-snack

Compatible with Gatsby v5.x.x. It's not tested with previous versions

$ npm install gatsby-remark-github-snack

Features

Converts remote videos hosted on GitHub (or elsewhere)

It automatically converts remote videos hosted on GitHub from your markdown files, or other type of remote URLs pointing to videos ending on mp4 or mov, into HTML videos

For instance:

https://user-images.githubusercontent.com/example_video.mov

// Gets transformed into ↓

<video width="400" controls style="margin-bottom: 16px">
    <source src="https://user-images.githubusercontent.com/example_video.mov" type="video/mp4">
</video>

Replaces remote snack URLs with an embedded playground in your websites.

https://snack.expo.dev/@rgommezz/layoutanimation => Any apperance of a link like this in your markdown gets replaced with the playground shown in the screenshot below

image

Usage with Mdx

In your gatsby-config file:

const config = {
  plugins: [
    {
      resolve: `gatsby-plugin-mdx`,
      options: {
        gatsbyRemarkPlugins: [
          "gatsby-remark-github-snack",
          // Other remark plugins here
        ],
      },
    },
    // Other Gatsby plugins here
  ],
};

Usage without Mdx

const config = {
  plugins: [
    {
      resolve: `gatsby-transformer-remark`,
      options: {
        plugins: [
          "gatsby-remark-github-snack",
          // Other remark plugins here
        ],
      },
    },
    // Other Gatsby plugins here
  ],
};

Keywords

FAQs

Last updated on 21 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc