0.1.1 • Published 5 years ago

gatsby-remark-import-code v0.1.1

Weekly downloads
124
License
MIT
Repository
github
Last release
5 years ago

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";
}
```

Related