Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
MDX deck layout for runnable code
JavaScript
Branch: master
Clone or download
Cannot retrieve the latest commit at this time.
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.babelrc setup build step correctly Nov 14, 2018
.gitignore bundle Nov 7, 2018
.npmignore
README.md Update README.md Nov 6, 2018
index.js initial commit Nov 6, 2018
package.json 1.1.3 Nov 14, 2018
rollup.config.js setup build step correctly Nov 14, 2018
yarn.lock Bump lodash from 4.17.11 to 4.17.15 Aug 28, 2019

README.md

mdx-code

A MDX Deck Layout that renders code blocks on a slide as a Runnable RunKit playground. Only for JavaScript (Node)

Install

yarn add --exact mdx-code

Use

import Code from 'mdx-code';

# Regular Slide

---
export default Code

```javascript A playground slide!
console.log('Hello world');
```

1

Preambles

A slide can have two code blocks. The first code block is run before the second, but the playground only displays the second.

export default Code

```
const x = [1, 2, 3];
```
```javascript x is already defined
x.map(i => i*2);
```

2

Authors

You can’t perform that action at this time.