0.4.2 • Published 5 years ago

gridsome-plugin-remark-codesandbox v0.4.2

Weekly downloads
3
License
MIT
Repository
-
Last release
5 years ago

Gridsome Plugin Remark CodeSandbox

Gridsome Plugin Remark CodeSandbox

This ia plugin for Gridsome's markdown engine Remark and it allows you to embed a CodeSandbox in your markdown files.

Installation

npm install gridsome-plugin-remark-codesandbox

How to use

module.exports = {
  plugins: [
    {
      use: '@gridsome/source-filesystem',
      options: {
        path: 'blog/**/*.md',
        route: '/blog/:year/:month/:day/:slug',
        remark: {
          plugins: [
            [ 'gridsome-plugin-remark-codesandbox']
          ]
        }
      }
    }
  ]
}

Usage

When you want to include a CodeSandbox in your markdown file just put the embed link on its own line.

This is just a test

https://codesandbox.io/embed/62o36qkmrr?fontsize=12

This is another one

https://codesandbox.io/embed/019ozxz8m0?fontsize=14

This is what the result looks like

Embed CodeSandbox in Markdown

Embed Options

You can pass options to the embed as a query string parameters. If you want to know what options are available check out the documentation on CodeSandboxes website below.

https://codesandbox.io/docs/embedding#embed-options

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago