gatsby-remark-import-code
v0.1.1
Published
### Install
Downloads
477
Readme
gatsby-remark-import-code
Install
$ npm install gatsby-remark-import-code
Use
Use it together with gatsby-plugin-mdx. In gatsby-config.js
:
module.exports = {
plugins: [
{
resolve: `gatsby-plugin-mdx`,
options: {
gatsbyRemarkPlugins: [`gatsby-remark-import-code`]
}
}
]
};
It transforms md/mdx code blocks from this:
```js file=./hello-world.js
```
into:
```js
function helloWorld() {
return "hello world";
}
```